private void StartGame() { sndButtonClick.Play(); if (OnlineClient != null && OnlineClient.IsConnected) { OnlineClient.StartGame(); } else { FightingZone NewMap; if (Room.MapPath == "Random") { DirectoryInfo MapDirectory = new DirectoryInfo(Content.RootDirectory + "/Maps/Triple Thunder/Battle/"); FileInfo[] ArrayMapFile = MapDirectory.GetFiles("*.ttm"); Random Random = new Random(); string FileName = ArrayMapFile[Random.Next(ArrayMapFile.Length)].Name; FileName = FileName.Remove(FileName.Length - 4); NewMap = new FightingZone("Battle/" + FileName, Room.UseTeams, Room.ListRoomPlayer); } else { NewMap = new FightingZone(Room.MapPath, Room.UseTeams, Room.ListRoomPlayer); } NewMap.Rules = new BattleGameRules(Room, NewMap); PushScreen(NewMap); } }
private void StartGame() { sndButtonClick.Play(); if (OnlineClient != null && OnlineClient.IsConnected) { OnlineClient.StartGame(); } else { RemoveAllScreens(); FightingZone NewMap = new FightingZone(Room.MapPath, true, Room.ListRoomPlayer); NewMap.Rules = new MissionGameRules(Room, NewMap); PushScreen(NewMap); } }