예제 #1
0
 // 102
 public bool JoinRoom(string roomN)
 {
     if (RoomSystem.RS.roomMarks.ContainsKey(roomN))
     {
         RoomContainer room = RoomSystem.RS.roomMarks[roomN];
         RoomBed       bed  = AddComponent <RoomBed>();
         bed.master = this;
         return(room.JoinRoom(bed));
     }
     return(false);
 }
예제 #2
0
        // 101
        public bool CreateRoom(string roomN)
        {
            if (!RoomSystem.RS.roomMarks.ContainsKey(roomN))
            {
                RoomBed bed = AddComponent <RoomBed>();
                bed.master = this;

                RoomContainer room = AddComponent <RoomContainer>();
                room.InitRoom(roomN, bed);

                RoomSystem.RS.roomMarks.Add(roomN, room);
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #3
0
 public override void OnDestroy()
 {
     base.OnDestroy();
     master = null;
     room   = null;
 }