| 184 | //} |
| 185 | |
| 186 | bool MenuGameLayer::onTouchBegan(ax::Touch* touch, ax::Event* event) |
| 187 | { |
| 188 | auto touchPos = touch->getLocation(); |
| 189 | ax::Rect hitbox = player->getBoundingBox(); |
| 190 | |
| 191 | //hitbox probably needs to be adjusted because it feels a bit off atm |
| 192 | //constexpr float hitboxMult = 2.5f; |
| 193 | //hitbox.origin -= {hitboxMult, hitboxMult}; |
| 194 | //hitbox.size += {hitboxMult * 2, hitboxMult * 2}; |
| 195 | |
| 196 | if(hitbox.containsPoint(touchPos)) { |
| 197 | this->resetPlayer(true); |
| 198 | } |
| 199 | return true; |
| 200 | } |
nothing calls this directly
no test coverage detected