Ejemplo n.º 1
0
    public HouseRoom()
    {
        Width  = 15; //temp
        Height = 15; //temp

        WallDirectionList.Add(Vector2Int.left);
        WallDirectionList.Add(Vector2Int.right);
        WallDirectionList.Add(Vector2Int.up);
        WallDirectionList.Add(Vector2Int.down);
    }
Ejemplo n.º 2
0
    public override void SetData(RoomData.RootObject roomData, DungeonData.RootObject dungeonData)
    {
        RoomData    = roomData;
        DungeonData = dungeonData;
        Width       = Random.Range(roomData.MinWidth, roomData.MaxWidth + 1);
        if (Width % 2 == 1)
        {
            Width += 1;
        }
        Height = Random.Range(roomData.MinHeight, roomData.MaxHeight + 1);
        if (Height % 2 == 1)
        {
            Height += 1;
        }
        _treasureAmount = Random.Range(roomData.MinTreasureAmount, roomData.MaxTreasureAmount + 1);
        _moneyAmount    = Random.Range(roomData.MinMoneyAmount, roomData.MaxMoneyAmount + 1);

        WallDirectionList.Add(Vector2Int.left);
        WallDirectionList.Add(Vector2Int.right);
        WallDirectionList.Add(Vector2Int.up);
        WallDirectionList.Add(Vector2Int.down);
    }