MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / update

Method update

Source/Platformer/UnitAction.cpp:92–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92void UnitAction::update(float dt) {
93 _elapsedTime += dt;
94 float reactionTime = _sensity * UnitAction::reaction;
95 if (reactionTime >= 0) {
96 _decisionDelay += dt;
97 if (_decisionDelay >= reactionTime) {
98 _decisionDelay = 0.0f;
99 // Check AI here
100 SharedAI.runDecisionTree(_owner);
101 }
102 }
103}
104
105void UnitAction::stop() {
106 _doing = false;

Callers

nothing calls this directly

Calls 15

stopFunction · 0.85
runDecisionTreeMethod · 0.80
isOnSurfaceMethod · 0.80
getEntityMethod · 0.80
setVelocityXMethod · 0.80
getPlayableMethod · 0.80
getUnitDefMethod · 0.80
onAttackMethod · 0.80
addToMethod · 0.80
getMethod · 0.65
startMethod · 0.65
minFunction · 0.50

Tested by

no test coverage detected