AddComments
This commit is contained in:
parent
2e5aeede16
commit
343f063422
3 changed files with 11 additions and 11 deletions
|
@ -32,15 +32,7 @@ namespace ZoFo.GameCore
|
|||
networkManager.JoinRoom(ip);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
public void JoinYourself(){ networkManager.JoinYourself(); }
|
||||
=======
|
||||
public void JoinYourself()
|
||||
{
|
||||
networkManager.JoinYourself();
|
||||
}
|
||||
>>>>>>> 2e9fccd99a44f3e5ae11ac70f5e7282ec85d9f98
|
||||
|
||||
internal void Update(GameTime gameTime)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public class MainMenuGUI : AbstractGUI
|
|||
};
|
||||
playButton.LeftButtonPressed += () =>
|
||||
{
|
||||
Server server = new Server();
|
||||
Server server = new Server(); //Server Logic SinglePlayer
|
||||
Client client = new Client();
|
||||
server.CreateRoom(1);
|
||||
client.JoinYourself();
|
||||
|
|
|
@ -37,13 +37,21 @@ namespace ZoFo.GameCore
|
|||
{
|
||||
networkManager.AddData(data);
|
||||
}
|
||||
public void CreateRoom(int players) //Создает комнату и запускает ожидание подключений
|
||||
/// <summary>
|
||||
/// Создает комнату и запускает ожидание подключений
|
||||
/// </summary>
|
||||
/// <param name="players"></param>
|
||||
public void CreateRoom(int players)
|
||||
{
|
||||
networkManager.Start(players);
|
||||
}
|
||||
|
||||
// public void StartGame() { } принудительный запуск
|
||||
public void EndGame() //Добавляет UpdateGameEnded и отключает игроков
|
||||
|
||||
/// <summary>
|
||||
/// Добавляет UpdateGameEnded и отключает игроков
|
||||
/// </summary>
|
||||
public void EndGame()
|
||||
{
|
||||
UpdateGameEnded gameEnded = new UpdateGameEnded();
|
||||
networkManager.AddData(gameEnded);
|
||||
|
|
Loading…
Add table
Reference in a new issue