Example #1
0
    public List <Point> BlinkRicochetTargets(UnitDisplay unitDisplay)
    {
        Point p = GetUnitPosition(unitDisplay);

        Point[] points = new Point[] { new Point(p.x + 1, p.y), new Point(p.x - 1, p.y), new Point(p.x, p.y + 1), new Point(p.x, p.y - 1) };

        List <Point> enemyPoints = new List <Point>();

        foreach (Point point in points)
        {
            UnitDisplay enemy = this.GetEnemy(point);
            if (enemy != null)
            {
                enemy.BlinkOn();
                enemyPoints.Add(point);
            }
        }

        return(enemyPoints);
    }
Example #2
0
    public List <Point> BlinkHealTargets(UnitDisplay unitDisplay, int range)
    {
        Point p = GetUnitPosition(unitDisplay);

        var          radiusPoints = this.FindPointsInRadius(p, range);
        List <Point> allyPoints   = new List <Point>();

        foreach (Point point in radiusPoints)
        {
            UnitDisplay ally = this.GetAlly(point);
            if (ally != null)
            {
                ally.BlinkOn();
                allyPoints.Add(point);
            }
        }

        this.HighlightPathInTilesByPoints(radiusPoints);

        return(allyPoints);
    }