diff --git a/GGJ17/Assets/Prefab/King.prefab b/GGJ17/Assets/Prefab/King.prefab index 33b6a2f..62fc341 100644 Binary files a/GGJ17/Assets/Prefab/King.prefab and b/GGJ17/Assets/Prefab/King.prefab differ diff --git a/GGJ17/Assets/Script/KingBehaviour.cs b/GGJ17/Assets/Script/KingBehaviour.cs index efde99e..b3604c6 100644 --- a/GGJ17/Assets/Script/KingBehaviour.cs +++ b/GGJ17/Assets/Script/KingBehaviour.cs @@ -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;