Package mindustry.ai.types
Class LogicAI
java.lang.Object
mindustry.entities.units.AIController
mindustry.ai.types.LogicAI
- All Implemented Interfaces:
UnitController
-
Field Summary
Modifier and TypeFieldDescriptionboolean
mindustry.gen.Building
float
static final float
Time after which the unit resets its controlled and reverts to a normal unit.mindustry.gen.Teamc
float
float
float
mindustry.gen.PosTeam
boolean
float
static final float
Minimum delay between item transfers.Fields inherited from class mindustry.entities.units.AIController
fallback, noTargetTime, rotateBackTimer, target, timer, timerTarget, timerTarget2, timerTarget3, timerTarget4, unit, vec
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkTarget
(mindustry.gen.Teamc target, float x, float y, float range) boolean
checkTargetTimer
(Object radar) boolean
invalid
(mindustry.gen.Teamc target) boolean
boolean
retarget()
boolean
mindustry.gen.Teamc
target
(float x, float y, float range, boolean air, boolean ground) void
Methods inherited from class mindustry.entities.units.AIController
circle, circle, circleAttack, commandPosition, commandTarget, faceMovement, faceTarget, fallback, findMainTarget, findTarget, getClosestSpawner, init, isLogicControllable, moveTo, moveTo, moveTo, moveTo, pathfind, stopShooting, targetFlag, unit, unit, unloadPayloads, updateTargeting, updateUnit, updateVisuals, updateWeapons, useFallback
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
-
transferDelay
public static final float transferDelayMinimum delay between item transfers.- See Also:
-
logicControlTimeout
public static final float logicControlTimeoutTime after which the unit resets its controlled and reverts to a normal unit.- See Also:
-
control
-
moveX
public float moveX -
moveY
public float moveY -
moveRad
public float moveRad -
controlTimer
public float controlTimer -
targetTimer
public float targetTimer -
controller
-
plan
-
execCache
-
aimControl
-
boost
public boolean boost -
mainTarget
public mindustry.gen.Teamc mainTarget -
shoot
public boolean shoot -
posTarget
public mindustry.gen.PosTeam posTarget
-
-
Constructor Details
-
LogicAI
public LogicAI()
-
-
Method Details
-
keepState
public boolean keepState()- Overrides:
keepState
in classAIController
- Returns:
- whether controller state should not be reset after reading. Do not override unless you know exactly what you are doing.
-
updateMovement
public void updateMovement()- Overrides:
updateMovement
in classAIController
-
checkTargetTimer
-
checkTarget
public boolean checkTarget(mindustry.gen.Teamc target, float x, float y, float range) - Overrides:
checkTarget
in classAIController
-
retarget
public boolean retarget()- Overrides:
retarget
in classAIController
-
invalid
public boolean invalid(mindustry.gen.Teamc target) - Overrides:
invalid
in classAIController
-
shouldShoot
public boolean shouldShoot()- Overrides:
shouldShoot
in classAIController
-
target
public mindustry.gen.Teamc target(float x, float y, float range, boolean air, boolean ground) - Overrides:
target
in classAIController
-