MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / resetPlayer

Method resetPlayer

Source/MenuGameLayer.cpp:151–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void MenuGameLayer::resetPlayer(bool touched)
152{
153 float x = touched ? -600.0f : -300.0f;
154 player->setPosition({x, 93.f});
155 auto mainColor = GameToolbox::randomColor3B();
156 auto secondaryColor = GameToolbox::randomColor3B();
157 player->setMainColor(mainColor);
158 player->setSecondaryColor(secondaryColor);
159}
160
161void MenuGameLayer::processBackground(float delta) {
162 float xpos = bgSprites->getPositionX();

Callers 2

processPlayerMovementMethod · 0.95
onTouchBeganMethod · 0.95

Calls 3

setPositionMethod · 0.80
setMainColorMethod · 0.45
setSecondaryColorMethod · 0.45

Tested by

no test coverage detected