sethballantyne / Plexis

A Breakout clone written in C++/CLI using DirectX 8, complete with level editor written in C#.
MIT License
2 stars 0 forks source link

Loading a level with no bricks results in the game crashing #122

Closed sethballantyne closed 4 years ago

sethballantyne commented 4 years ago

Created a blank level in the editor and attempted to play it in the game:

[16/05/20 11:18:05] Fatal Error: System.Xml.XmlException thrown. no <brick> tags found in the level blank's xml.
Stack trace: 
   at LevelManager.ReadLevel(String levelFile, Boolean testLevel)
   at LevelManager.GetNextLevel()
   at GameLogic.Update(Keys keyboardState, Mouse mouseState)
   at GameView.Update(Keys keyboardState, Mouse mouseState)
   at Scene.Update(Keys keyboardState, Mouse mouseState)
   at Game.Update()
   at WinMain(HINSTANCE__* hInstance, HINSTANCE__* hPrevInstance, SByte* lpCmdLine, Int32 nCmdShow)