Skip to content

Commit

Permalink
Enemy Layer
Browse files Browse the repository at this point in the history
  • Loading branch information
AdronTech committed Jan 22, 2017
1 parent 71d046e commit fc4b49f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Binary file modified GGJ17/Assets/Prefab/King.prefab
Binary file not shown.
3 changes: 2 additions & 1 deletion GGJ17/Assets/Script/KingBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ IEnumerator scanForTarget()
bestTarget = possible;
}

if (!mySeek.target || !possibleTargets.Contains(mySeek.target) ||
if (!mySeek.target ||
!possibleTargets.Contains(mySeek.target) ||
getPriority(bestTarget) > getPriority(mySeek.target) ||
(getPriority(bestTarget) == getPriority(mySeek.target) && Vector3.Distance(my.pos, bestTarget.position) <= Vector3.Distance(my.pos, mySeek.target.position)))
mySeek.target = bestTarget;
Expand Down

0 comments on commit fc4b49f

Please sign in to comment.