Beispiel #1
0
 private void HandleStartGameMessage(StartGameMessage mess)
 {
     if (Game.DataEngine.Arena != null && Game.DataEngine.Arena.ID == mess.ArenaID) return;
     Game.DataEngine.ArenaFinishTime = mess.ArenaTimeLeft == TimeSpan.Zero ? TimeSpan.Zero : mess.ArenaTimeLeft + Game.GameTime.TotalRealTime;
     Game.PrepareArenaOnClient(mess.GameplayMode, mess.ArenaToPlay, mess.ArenaID, mess.WallCount);
 }
Beispiel #2
0
 private void MakeClientStartArena(GameClientConnection conn)
 {
     var arenaName = _game.SelectedArenaName;
     var startGameMessage = new StartGameMessage
     {
         GameplayMode = _game.DataEngine.GameplayMode.Name,
         ArenaID = Game.DataEngine.Arena.ID,
         ArenaToPlay = arenaName,
         ArenaTimeLeft = Game.DataEngine.ArenaFinishTime == TimeSpan.Zero ? TimeSpan.Zero : Game.DataEngine.ArenaFinishTime - Game.GameTime.TotalRealTime,
         WallCount = Game.DataEngine.Arena.Gobs.All<AW2.Game.Gobs.Wall>().Count()
     };
     conn.Send(startGameMessage);
     conn.ConnectionStatus.CurrentArenaName = arenaName;
 }