| 28 | USING_NS_AX; |
| 29 | |
| 30 | bool SimplePlayer::init(int cubeID) { |
| 31 | if (!Sprite::init()) return false; |
| 32 | |
| 33 | this->updateGamemode(cubeID, IconType::kIconTypeCube); |
| 34 | this->setContentSize({ 60, 60 }); |
| 35 | this->setAnchorPoint({.25f, .25f}); |
| 36 | |
| 37 | return true; |
| 38 | } |
| 39 | |
| 40 | void SimplePlayer::updateGamemode(int iconID, IconType mode) { |
| 41 | iconID = GameToolbox::inRange(iconID, 1, GameToolbox::getValueForGamemode(mode)); |