Ejemplo n.º 1
0
        private void Unhighlight()
        {
            Point closestTarget = AIUtils.GetClosestUnit(this.UnitsMap, this.Unit.GetPosition(), new Point(this.Unit.GetPosition().x - 1, 0, this.Unit.GetPosition().z));

            if (closestTarget != default)
            {
                SimulateAttack(false, closestTarget, this.DeltaHealth, this.Knockback, true);
            }

            closestTarget = AIUtils.GetClosestUnit(this.UnitsMap, this.Unit.GetPosition(), new Point(this.Unit.GetPosition().x + 1, 0, this.Unit.GetPosition().z));
            if (closestTarget != default)
            {
                SimulateAttack(false, closestTarget, this.DeltaHealth, this.Knockback, true);
            }

            closestTarget = AIUtils.GetClosestUnit(this.UnitsMap, this.Unit.GetPosition(), new Point(this.Unit.GetPosition().x, 0, this.Unit.GetPosition().z - 1));
            if (closestTarget != default)
            {
                SimulateAttack(false, closestTarget, this.DeltaHealth, this.Knockback, true);
            }

            closestTarget = AIUtils.GetClosestUnit(this.UnitsMap, this.Unit.GetPosition(), new Point(this.Unit.GetPosition().x, 0, this.Unit.GetPosition().z + 1));
            if (closestTarget != default)
            {
                SimulateAttack(false, closestTarget, this.DeltaHealth, this.Knockback, true);
            }
        }
Ejemplo n.º 2
0
        private void Highlight(Point position)
        {
            Point closestTarget = AIUtils.GetClosestUnit(this.UnitsMap, this.Unit.GetPosition(), position);

            if (closestTarget != default)
            {
                SimulateAttack(true, closestTarget, this.DeltaHealth, this.Knockback, true);
            }
        }