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