Beispiel #1
0
 public Room(Enums.RoomType roomType)
 {
     this.RoomType = roomType;
     GenerateRoom();
     GenerateItem();
     GenerateEnemies();
 }
Beispiel #2
0
        public Room(
            int houseId,
            string title,
            string description,
            Enums.RoomType roomType,
            Enums.LeaseType leaseType,
            decimal rentalFee)
        {
            this.HouseId     = houseId;
            this.Title       = title;
            this.Description = description;
            this.RoomType    = roomType;
            this.LeaseType   = leaseType;
            this.RentalFee   = rentalFee;

            _roomImages = new List <RoomImage>();
        }
Beispiel #3
0
        public Room AddRoom(
            string title,
            string description,
            Enums.RoomType roomType,
            Enums.LeaseType leaseType,
            decimal rentalFee)
        {
            var room = new Room(
                this.Id,
                title,
                description,
                roomType,
                leaseType,
                rentalFee);

            _rooms.Add(room);
            return(room);
        }
Beispiel #4
0
    public RoomData GetRandomRoomByTyoe(Enums.RoomType type)
    {
        List <RoomData> rooms = new List <RoomData> ();

        foreach (KeyValuePair <string, RoomData> entry in roomList)
        {
            if (EnumUtility.StringToRoomType(entry.Value.type) == type && !entry.Value.is_boss)
            {
                rooms.Add(entry.Value);
            }
        }
        if (rooms.Count > 0)
        {
            return(rooms [Random.Range(0, rooms.Count)]);
        }
        else
        {
            return(null);
        }
    }
Beispiel #5
0
 public Stairs(Enums.RoomType roomType)
 {
     this.RoomType = roomType;
 }
Beispiel #6
0
 public Node(Enums.RoomType roomType)
 {
     this.room = new Room(roomType);
 }
Beispiel #7
0
 public Room(int id, string roomLabel, Enums.RoomType roomType)
 {
     Id        = id;
     RoomLabel = roomLabel;
     RoomType  = roomType;
 }