public IRoomInformations GenerateNewRoom(string RoomName, string RoomType, string RoomSubtype, string Password, string OwnerServerIP, int OwnerServerPort, int MaxNumberOfPlayer) { DateTimeOffset CurrentTime = DateTimeOffset.Now; RoomInformations NewRoom = null; if (RoomType == RoomInformations.RoomTypeMission) { NewRoom = new MissionRoomInformations(RoomIDCount++.ToString(), RoomName, RoomType, RoomSubtype, Password, OwnerServerIP, OwnerServerPort, MaxNumberOfPlayer); } else if (RoomType == RoomInformations.RoomTypeBattle) { NewRoom = new BattleRoomInformations(RoomIDCount++.ToString(), RoomName, RoomType, RoomSubtype, Password, OwnerServerIP, OwnerServerPort, MaxNumberOfPlayer); } if (ListRoom.ContainsKey(CurrentTime)) { ListRoom[CurrentTime].Add(NewRoom); } else { ListRoom.Add(CurrentTime, new List <IRoomInformations>() { NewRoom }); } return(NewRoom); }
public BattleGameRules(BattleRoomInformations Room, FightingZone Map) : base(Map) { this.Room = Room; GameLengthInSeconds = 0; DicPointsPerTeam = new Dictionary <int, int>(); ListCurrentLivesRemainingPerTeam = new List <int>(); }
public BattleSelect(TripleThunderOnlineClient OnlineClient, BattleRoomInformations Room) { this.OnlineClient = OnlineClient; this.Room = Room; if (Room.ListRoomPlayer.Count == 0) { PlayerManager.ListLocalPlayer[0].PlayerType = Player.PlayerTypeHost; Room.AddLocalPlayer(PlayerManager.ListLocalPlayer[0]); } }