Package mindustry.ai.types
Class BuilderAI
java.lang.Object
mindustry.entities.units.AIController
mindustry.ai.types.BuilderAI
- All Implemented Interfaces:
UnitController
-
Field Summary
Modifier and TypeFieldDescriptionboolean
mindustry.gen.Unit
static float
static float
mindustry.gen.Teamc
float
mindustry.gen.Unit
boolean
float
static float
static float
Fields inherited from class mindustry.entities.units.AIController
fallback, noTargetTime, rotateBackTimer, target, timer, timerTarget, timerTarget2, timerTarget3, timerTarget4, unit, vec
-
Constructor Summary
-
Method Summary
Methods inherited from class mindustry.entities.units.AIController
checkTarget, circle, circle, circleAttack, commandPosition, commandTarget, faceMovement, faceTarget, findMainTarget, findTarget, getClosestSpawner, invalid, isLogicControllable, keepState, moveTo, moveTo, moveTo, moveTo, pathfind, retarget, stopShooting, target, targetFlag, unit, unit, unloadPayloads, updateTargeting, updateUnit, updateVisuals, updateWeapons
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface mindustry.entities.units.UnitController
hit, isBeingControlled, isValidController, removed
-
Field Details
-
buildRadius
public static float buildRadius -
retreatDst
public static float retreatDst -
retreatDelay
public static float retreatDelay -
defaultRebuildPeriod
public static float defaultRebuildPeriod -
assistFollowing
-
following
-
enemy
-
lastPlan
-
fleeRange
public float fleeRange -
rebuildPeriod
public float rebuildPeriod -
alwaysFlee
public boolean alwaysFlee -
onlyAssist
public boolean onlyAssist
-
-
Constructor Details
-
BuilderAI
public BuilderAI(boolean alwaysFlee, float fleeRange) -
BuilderAI
public BuilderAI()
-
-
Method Details
-
init
public void init()Description copied from class:AIController
Called after this controller is assigned a unit.- Overrides:
init
in classAIController
-
updateMovement
public void updateMovement()- Overrides:
updateMovement
in classAIController
-
nearEnemy
protected boolean nearEnemy(int x, int y) -
fallback
- Overrides:
fallback
in classAIController
-
useFallback
public boolean useFallback()- Overrides:
useFallback
in classAIController
-
shouldShoot
public boolean shouldShoot()- Overrides:
shouldShoot
in classAIController
-