circleTarget unit AI parameter

This commit is contained in:
Anuken 2020-12-11 13:31:31 -05:00
parent adeeaa6e27
commit 6983f57459
6 changed files with 5 additions and 5 deletions

Binary file not shown.

View file

@ -130,6 +130,6 @@ public class BuilderAI extends AIController{
@Override
public boolean shouldShoot(){
return !((Builderc)unit).isBuilding();
return !unit.isBuilding();
}
}

View file

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

View file

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

View file

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

View file

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