diff --git a/ZoFo/GameCore/GUI/WaitingForPlayersGUI.cs b/ZoFo/GameCore/GUI/WaitingForPlayersGUI.cs index d500c49..c7d8c35 100644 --- a/ZoFo/GameCore/GUI/WaitingForPlayersGUI.cs +++ b/ZoFo/GameCore/GUI/WaitingForPlayersGUI.cs @@ -53,6 +53,8 @@ public class WaitingForPlayersGUI : AbstractGUI { // start AppManager.Instance.ChangeState(GameState.HostPlaying); + AppManager.Instance.SetGUI(new HUD()); + AppManager.Instance.server.StartGame(); // ваш код здесь }; Elements.Add(startButton); diff --git a/ZoFo/GameCore/Server.cs b/ZoFo/GameCore/Server.cs index 2abf5dd..c9ebf6e 100644 --- a/ZoFo/GameCore/Server.cs +++ b/ZoFo/GameCore/Server.cs @@ -140,7 +140,7 @@ namespace ZoFo.GameCore networkManager.AddData(gameEnded); } - public List gameObjects; + public List gameObjects = new List(); public List entities; //entity public List players; public void Update(GameTime gameTime)