diff --git a/ZoFo/GameCore/GUI/MainMenuGUI.cs b/ZoFo/GameCore/GUI/MainMenuGUI.cs index 4683ddd..2c098ac 100644 --- a/ZoFo/GameCore/GUI/MainMenuGUI.cs +++ b/ZoFo/GameCore/GUI/MainMenuGUI.cs @@ -39,8 +39,8 @@ public class MainMenuGUI : AbstractGUI fontName = "Fonts\\Font" }; playButton.LeftButtonPressed += () => - { - AppManager.Instance.SetGUI(new SelectModeMenu()); + { + AppManager.Instance.SetGUI(new SelectModeMenu()); }; Elements.Add(playButton); Button optionButton = new Button(Manager) diff --git a/ZoFo/GameCore/GUI/SelectModeMenu.cs b/ZoFo/GameCore/GUI/SelectModeMenu.cs index 5f3262e..0918b5a 100644 --- a/ZoFo/GameCore/GUI/SelectModeMenu.cs +++ b/ZoFo/GameCore/GUI/SelectModeMenu.cs @@ -39,7 +39,13 @@ public class SelectModeMenu : AbstractGUI playButton.LeftButtonPressed += () => { // single - + Server server = new Server(); //Server Logic SinglePlayer + Client client = new Client(); + server.CreateRoom(1); + client.JoinYourself(); + AppManager.Instance.SetServer(server); + AppManager.Instance.SetClient(client); + AppManager.Instance.ChangeState(GameState.HostPlaying); // ваш код здесь }; Elements.Add(playButton);