| 1139 | return _available(_owner, s_cast<UnitAction*>(this)); |
| 1140 | } |
| 1141 | virtual void run() override { |
| 1142 | UnitAction::run(); |
| 1143 | if (auto playable = _owner->getPlayable()) { |
| 1144 | playable->setRecovery(recovery); |
| 1145 | } |
| 1146 | _update = std::move(_create(_owner, s_cast<UnitAction*>(this))->update); |
| 1147 | if (_update(_owner, s_cast<UnitAction*>(this), 0.0f)) { |
| 1148 | WasmUnitAction::stop(); |
| 1149 | } |
| 1150 | } |
| 1151 | virtual void update(float dt) override { |
| 1152 | if (_update && _update(_owner, s_cast<UnitAction*>(this), dt)) { |
| 1153 | WasmUnitAction::stop(); |
nothing calls this directly
no test coverage detected