circleTarget unit AI parameter
This commit is contained in:
@@ -130,6 +130,6 @@ public class BuilderAI extends AIController{
|
||||
|
||||
@Override
|
||||
public boolean shouldShoot(){
|
||||
return !((Builderc)unit).isBuilding();
|
||||
return !unit.isBuilding();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class FlyingAI extends AIController{
|
||||
@Override
|
||||
public void updateMovement(){
|
||||
if(target != null && unit.hasWeapons() && command() == UnitCommand.attack){
|
||||
if(unit.type.weapons.first().rotate){
|
||||
if(unit.type.circleTarget){
|
||||
moveTo(target, unit.range() * 0.8f);
|
||||
unit.lookAt(target);
|
||||
}else{
|
||||
|
||||
@@ -918,6 +918,7 @@ public class UnitTypes implements ContentList{
|
||||
range = 140f;
|
||||
targetAir = false;
|
||||
commandLimit = 4;
|
||||
circleTarget = true;
|
||||
|
||||
weapons.add(new Weapon(){{
|
||||
y = 0f;
|
||||
@@ -950,6 +951,7 @@ public class UnitTypes implements ContentList{
|
||||
armor = 3f;
|
||||
targetFlag = BlockFlag.factory;
|
||||
commandLimit = 5;
|
||||
circleTarget = true;
|
||||
|
||||
weapons.add(new Weapon(){{
|
||||
minShootVelocity = 0.75f;
|
||||
|
||||
@@ -335,8 +335,6 @@ public class Control implements ApplicationListener, Loadable{
|
||||
state.wave = 1;
|
||||
//set up default wave time
|
||||
state.wavetime = state.rules.waveSpacing * 2f;
|
||||
//slightly increase wave spacing as a handicap
|
||||
state.rules.waveSpacing += 60f * 10;
|
||||
//reset captured state
|
||||
sector.info.wasCaptured = false;
|
||||
//re-enable waves
|
||||
|
||||
@@ -46,7 +46,7 @@ public class UnitType extends UnlockableContent{
|
||||
public float health = 200f, range = -1, armor = 0f, maxRange = -1f;
|
||||
public float crashDamageMultiplier = 1f;
|
||||
public boolean targetAir = true, targetGround = true;
|
||||
public boolean faceTarget = true, rotateShooting = true, isCounted = true, lowAltitude = false;
|
||||
public boolean faceTarget = true, rotateShooting = true, isCounted = true, lowAltitude = false, circleTarget = true;
|
||||
public boolean canBoost = false;
|
||||
public boolean destructibleWreck = true;
|
||||
public float groundLayer = Layer.groundUnit;
|
||||
|
||||
Reference in New Issue
Block a user