Enemy AI now stops near core when in range; collision avoidance

This commit is contained in:
Anuken
2017-11-11 14:03:04 -05:00
parent 12aa8c406b
commit 60a5782a24
2 changed files with 17 additions and 4 deletions
+5 -1
View File
@@ -40,7 +40,11 @@ public class Pathfind{
target = path[enemy.node];
}
//near the core, stop
if(enemy.node == path.length - 1){
vector.set(target.worldx(), target.worldy());
}
return vector.set(target.worldx(), target.worldy());