Implemented shooting and states for ground units

This commit is contained in:
Anuken
2018-05-03 12:59:23 -04:00
parent 42b3b19a57
commit 2af750cfec
8 changed files with 127 additions and 50 deletions

View File

@@ -89,7 +89,12 @@ public class Pathfinder {
}
path.search ++;
path.frontier.clear();
if(path.lastSearchTime + 1000/60*3 > TimeUtils.millis()){
path.frontier.clear();
}
path.lastSearchTime = TimeUtils.millis();
ObjectSet<Tile> set = world.indexer().getEnemy(team, BlockFlag.target);
for(Tile other : set){
@@ -171,6 +176,7 @@ public class Pathfinder {
float[][] weights;
int[][] searches;
int search = 0;
long lastSearchTime;
Queue<Tile> frontier = new Queue<>();
PathData(){