Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public IRoomInformations GenerateNewRoom(string RoomName, string Password, string OwnerServerIP, int OwnerServerPort)
        {
            DateTimeOffset   CurrentTime = DateTimeOffset.Now;
            RoomInformations NewRoom     = new RoomInformations(RoomIDCount++.ToString(), RoomName, OwnerServerIP, OwnerServerPort);

            if (ListRoom.ContainsKey(CurrentTime))
            {
                ListRoom[CurrentTime].Add(NewRoom);
            }
            else
            {
                ListRoom.Add(CurrentTime, new List <IRoomInformations>()
                {
                    NewRoom
                });
            }

            return(NewRoom);
        }
 public BattleModeSelect(RoomInformations Room, BattleSelect Owner, TripleThunderOnlineClient OnlineClient)
 {
     this.Room         = Room;
     this.Owner        = Owner;
     this.OnlineClient = OnlineClient;
 }
 public BattleMapSelect(RoomInformations Room, BattleSelect Owner)
 {
     this.Room       = Room;
     this.Owner      = Owner;
     ListMissionInfo = new List <MissionInfo>();
 }