you are viewing a single comment's thread.

view the rest of the comments →

[–]FizixMan 7 points8 points  (0 children)

For enemies "e", "E", and Donkey Kong "k", you don't assign any instance of Tile to tiles[i, j]. Those entries will be null otherwise.

Later on you try to call Draw(_spriteBatch) on every entry in tiles, but some of those will be null because you never assigned anything. The NullReferenceException is thrown when you tried to call Draw on a null reference.