| 996 | } |
| 997 | |
| 998 | void PlayerObject::stopRotation() |
| 999 | { |
| 1000 | stopActionByTag(0); |
| 1001 | |
| 1002 | if (getActionByTag(1) == nullptr) |
| 1003 | { |
| 1004 | if (getRotation() != 0) |
| 1005 | { |
| 1006 | int degrees = (int)getRotation() % 360; |
| 1007 | auto action = RotateTo::create(0.075f, (90 * roundf(degrees / 90.0f))); |
| 1008 | action->setTag(1); |
| 1009 | runAction(action); |
| 1010 | } |
| 1011 | } |
| 1012 | } |
| 1013 | |
| 1014 | void PlayerObject::jump() |
| 1015 | { |