Ejemplo n.º 1
0
    public List <Vector2Int> GetPossibleSpawnLocations()
    {
        var rect = new RogueRect()
        {
            Left   = Bounds.Left + 1,
            Right  = Bounds.Right - 2,
            Bottom = Bounds.Bottom + 1,
            Top    = Bounds.Top - 2
        };

        return(rect.GetPoints());
    }
Ejemplo n.º 2
0
    private Vector2Int?FindStairsLocation()
    {
        var spawnArea = new RogueRect()
        {
            Left   = Bounds.Left + 2,
            Right  = Bounds.Right - 3,
            Top    = Bounds.Top - 3,
            Bottom = Bounds.Bottom + 2
        };
        var possiblePoints = spawnArea.GetPoints();

        if (possiblePoints.Count > 0)
        {
            return(SeededRandom.PickRandom(possiblePoints));
        }
        return(null);
    }