Package mindustry.ai.types
Class BuilderAI
java.lang.Object
mindustry.entities.units.AIController
mindustry.ai.types.BuilderAI
- All Implemented Interfaces:
UnitController
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanmindustry.gen.Unitstatic floatstatic floatmindustry.gen.Teamcfloatmindustry.gen.Unitbooleanfloatstatic floatstatic floatFields inherited from class mindustry.entities.units.AIController
bomberTarget, fallback, noTargetTime, rotateBackTimer, target, timer, timerTarget, timerTarget2, timerTarget3, timerTarget4, unit, vec -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class mindustry.entities.units.AIController
afterRead, alterPathfind, checkTarget, circle, circle, circleAttack, commandPosition, commandTarget, faceMovement, faceTarget, findMainTarget, findTarget, getClosestSpawner, invalid, isLogicControllable, keepState, moveTo, moveTo, moveTo, moveTo, pathfind, pathfind, pathfind, prefSpeed, resetTimers, retarget, stanceChanged, stopShooting, target, targetFlag, targetInvalidated, unit, unit, unloadPayloads, updateTargeting, updateUnit, updateVisuals, updateWeaponsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface mindustry.entities.units.UnitController
hit, 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
@Nullable public mindustry.gen.Unit assistFollowing -
following
@Nullable public mindustry.gen.Unit following -
enemy
@Nullable public mindustry.gen.Teamc 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:AIControllerCalled after this controller is assigned a unit.- Overrides:
initin classAIController
-
updateMovement
public void updateMovement()- Overrides:
updateMovementin classAIController
-
nearEnemy
protected boolean nearEnemy(int x, int y) -
fallback
- Overrides:
fallbackin classAIController
-
useFallback
public boolean useFallback()- Overrides:
useFallbackin classAIController
-
shouldFire
public boolean shouldFire()- Overrides:
shouldFirein classAIController- Returns:
- whether the unit should actually fire bullets (as opposed to just targeting something)
-
shouldShoot
public boolean shouldShoot()- Overrides:
shouldShootin classAIController
-