| 137 | return true; |
| 138 | } |
| 139 | void MenuGameLayer::processPlayerMovement(float delta) { |
| 140 | float step = std::min(2.0f, delta * 60.0f); |
| 141 | const auto& winSize = Director::getInstance()->getWinSize(); |
| 142 | step /= 4.0f; |
| 143 | |
| 144 | this->player->setPositionX(this->player->getPositionX() + (step * 18.f)); |
| 145 | |
| 146 | if(this->player->getPositionX() >= winSize.width + player->getContentSize().width) { |
| 147 | this->resetPlayer(false); |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | void MenuGameLayer::resetPlayer(bool touched) |
| 152 | { |
nothing calls this directly
no test coverage detected