Esempio n. 1
0
    //highlights tiles when moused over a potential target in red.
    public void Target(Vector3 pos, Card.RangeType rt, int area, HighlightTiles.TileType type, List <Card.TargetType> validTypes)
    {
        Vector3Int origin = WorldToCellSpace(pos);

        targets.Clear();
        if (highlights.Contains(origin))
        {
            switch (rt)
            {
            case Card.RangeType.Area:
                targets.FloodFill(origin, area, type, validTypes);
                break;

            case Card.RangeType.Row:
                targets.FillRow(origin, area, type, validTypes);
                break;

            case Card.RangeType.Cross:
                targets.FillCross(origin, area, type, validTypes);
                break;
            }
        }
    }
Esempio n. 2
0
 //clears out highlights.
 public void ClearHighlight()
 {
     highlights.Clear();
 }