ReadyCreateServerGame
This commit is contained in:
parent
b2041c07f5
commit
9d9709441c
2 changed files with 9 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue