| 357 | } |
| 358 | |
| 359 | void Unit::stop() { |
| 360 | if (_currentAction && _currentAction->isDoing()) { |
| 361 | _currentAction->stop(); |
| 362 | _currentAction->_status = Behavior::Status::Success; |
| 363 | _currentAction = nullptr; |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | bool Unit::isDoing(String name) { |
| 368 | return _currentAction && _currentAction->getName() == name && _currentAction->isDoing(); |