Moves from texture2ds to spritestates

Fixes preformance problems.

A spritestate is a string containing the name of the sprite it is using,
instead of the whole sprite.

It is a little more complacated than using just a texture2d, but many
times faster.