Merge branch 'master' into crater
This commit is contained in:
@@ -33,8 +33,7 @@ public class Pathfinder implements Runnable{
|
||||
/** handles task scheduling on the update thread. */
|
||||
private TaskQueue queue = new TaskQueue();
|
||||
/** current pathfinding thread */
|
||||
private @Nullable
|
||||
Thread thread;
|
||||
private @Nullable Thread thread;
|
||||
|
||||
public Pathfinder(){
|
||||
Events.on(WorldLoadEvent.class, event -> {
|
||||
|
||||
@@ -17,6 +17,10 @@ public class Teams{
|
||||
/** Active teams. */
|
||||
private Array<TeamData> active = new Array<>();
|
||||
|
||||
public Teams(){
|
||||
active.add(get(Team.crux));
|
||||
}
|
||||
|
||||
public @Nullable CoreEntity closestEnemyCore(float x, float y, Team team){
|
||||
for(TeamData data : active){
|
||||
if(areEnemies(team, data.team)){
|
||||
@@ -85,7 +89,6 @@ public class Teams{
|
||||
|
||||
/** Returns whether {@param other} is an enemy of {@param #team}. */
|
||||
public boolean areEnemies(Team team, Team other){
|
||||
//todo what about derelict?
|
||||
return team != other;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user