예제 #1
0
    private void UpdateDoorWallCheck(Door door, RCConnection connection, Vector3Int offset)
    {
        bool shouldWall = connection.isWall || connection.isAvailable;

        door.SetIsWall(shouldWall);
        if (shouldWall)
        {
            wall.SetTile(offset + connection.pos, defaultWall);
            ceil.SetTile(offset + connection.pos, defaultCeil);
            floor.SetTile(offset + connection.pos, null);

            if (door.isVertical)
            {
                wall.SetTile(offset + Vector3Int.up + connection.pos, defaultWall);
                ceil.SetTile(offset + Vector3Int.up + connection.pos, defaultCeil);
                wall.SetTile(offset + Vector3Int.down + connection.pos, defaultWall);
                ceil.SetTile(offset + Vector3Int.down + connection.pos, defaultCeil);
                floor.SetTile(offset + Vector3Int.up + connection.pos, null);
                floor.SetTile(offset + Vector3Int.down + connection.pos, null);
            }
            else
            {
                wall.SetTile(offset + Vector3Int.left + connection.pos, defaultWall);
                ceil.SetTile(offset + Vector3Int.left + connection.pos, defaultCeil);
                wall.SetTile(offset + Vector3Int.right + connection.pos, defaultWall);
                ceil.SetTile(offset + Vector3Int.right + connection.pos, defaultCeil);
                floor.SetTile(offset + Vector3Int.left + connection.pos, null);
                floor.SetTile(offset + Vector3Int.right + connection.pos, null);
            }
        }
    }
예제 #2
0
    public List <Vector3Int> path = new List <Vector3Int>(); // exclusive

    public HallwayObj(RCObj RCA, RCObj RCB, RCConnection conA, RCConnection conB, bool isStraight)
    {
        roomA          = RCA;
        roomB          = RCB;
        connectionA    = conA;
        connectionB    = conB;
        isPathStraight = isStraight;
    }