Merge branch 'master' into crater

This commit is contained in:
Patrick 'Quezler' Mounier
2020-01-28 20:06:16 +01:00
4 changed files with 11 additions and 5 deletions

View File

@@ -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 -> {

View File

@@ -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;
}