mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-27 06:51:30 -08:00
circleTarget unit AI parameter
This commit is contained in:
parent
adeeaa6e27
commit
6983f57459
6 changed files with 5 additions and 5 deletions
Binary file not shown.
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue