the worlds WORST code
This commit is contained in:
parent
99cda5f6b9
commit
c2a71d5188
6 changed files with 731 additions and 8 deletions
|
|
@ -53,7 +53,7 @@ public class Enemy : Entity
|
|||
Ability foundAbility = null;
|
||||
foreach (Ability availableAbility in allAbilities)
|
||||
{
|
||||
if (foundAbility == null && availableAbility.currentCooldown <= 0)
|
||||
if (foundAbility == null && availableAbility.currentCooldown <= 0 && availableAbility.ability.range < Vector3.Distance(closestTarget.transform.position, transform.position))
|
||||
{
|
||||
foundAbility = availableAbility;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue