type.speed -> speed()

This commit is contained in:
DeltaNedas
2020-11-07 11:59:37 +00:00
parent 29b8db0a85
commit 7ec50fb800
8 changed files with 13 additions and 23 deletions

View File

@@ -79,7 +79,7 @@ public class BuilderAI extends AIController{
float dist = Math.min(cons.dst(unit) - buildingRange, 0);
//make sure you can reach the request in time
if(dist / unit.type.speed < cons.buildCost * 0.9f){
if(dist / unit.speed() < cons.buildCost * 0.9f){
following = b;
found = true;
}

View File

@@ -55,7 +55,7 @@ public class FlyingAI extends AIController{
vec.setAngle(Mathf.slerpDelta(unit.vel().angle(), vec.angle(), 0.6f));
}
vec.setLength(unit.type.speed);
vec.setLength(unit.speed());
unit.moveAt(vec);
}

View File

@@ -65,7 +65,7 @@ public class SuicideAI extends GroundAI{
if(!blocked){
moveToTarget = true;
//move towards target directly
unit.moveAt(vec.set(target).sub(unit).limit(unit.type.speed));
unit.moveAt(vec.set(target).sub(unit).limit(unit.speed()));
}
}