optimization of TextureTileLoader

if there are no states in the machine then the game will exit
added on animation end event to animation
TextureTileLoader now stores tiles in an array on construction
getTile now retrieves tile from stored tiles
get tile can now return null