Example #1
0
 private void PlayButtonClick(object sender, EventArgs e)
 {
     if (!Game.MapLoaded)
     {
         return;
     }
     Game.Playing = !Game.Playing;
     if (Game.Playing)
     {
         Game.SaveMap(_currentMapName);
         _focusTextbox.Focus();
         _focusTextbox.LostFocus += RefocusInputBox;
         Camera.UpdateWorldRectangle(Game.TileMap);
         GameVariableProvider.SaveManager.CurrentSaveState = new SaveState();
     }
     else
     {
         Game.LoadMap(_currentMapName);
         _focusTextbox.LostFocus -= RefocusInputBox;
         BulletManager.GetInstance().ClearAllBullets();
     }
 }