MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / IsHeld

Method IsHeld

TombEngine/Specific/Input/InputAction.cpp:130–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128 }
129
130 bool Action::IsHeld(float delaySec) const
131 {
132 unsigned int delayGameFrames = (delaySec == 0.0f) ? 0 : SecToGameFrames(delaySec);
133 return (_value != 0.0f && _timeActive >= delayGameFrames);
134 }
135
136 // NOTE: To avoid stutter on second pulse, ensure `initialDelaySec` is multiple of `delaySec`.
137 bool Action::IsPulsed(float delaySec, float initialDelaySec) const

Callers 3

DrawDebugInfoMethod · 0.80
NoActionFunction · 0.80
IsHeldFunction · 0.80

Calls 1

SecToGameFramesFunction · 0.85

Tested by

no test coverage detected