Exemplo n.º 1
0
    public void UnlockDoor(DungeonRoomInfo.WallDirection dir)
    {
        if (!IsDoorLocked(dir))
        {
            //Debug.LogError("Trying to Unlock door that is not Locked.");
            return;
        }
        SetWallTypeForDirection(dir, DungeonRoomInfo.WallType.DoorOpen);

        DungeonRoom adjoiningRoom = GetAdjoiningRoom(dir);

        if (adjoiningRoom != null)
        {
            adjoiningRoom.UnlockDoor(DungeonRoomInfo.GetOppositeDirection(dir));
        }

        PlayUnlockSound();
    }
Exemplo n.º 2
0
    public void BlowHoleInWall(DungeonRoomInfo.WallDirection dir)
    {
        if (IsWallBombedOpen(dir))
        {
            //Debug.LogError("Trying to Blow Hole In Wall that is already bombed open.");
            return;
        }
        if (!Info.IsBombable(dir))
        {
            Debug.LogError("Trying to Blow Hole In Wall that is not bombable.");
            return;
        }
        SetWallTypeForDirection(dir, DungeonRoomInfo.WallType.Bombed);

        DungeonRoom adjoiningRoom = GetAdjoiningRoom(dir);

        if (adjoiningRoom != null)
        {
            adjoiningRoom.BlowHoleInWall(DungeonRoomInfo.GetOppositeDirection(dir));
        }
    }