| 129 | } |
| 130 | |
| 131 | void PlayLayer::spawnCircle() |
| 132 | { |
| 133 | auto size = Director::getInstance()->getWinSize(); |
| 134 | |
| 135 | auto minArea = Vec2({40, 70}); |
| 136 | auto maxArea = Vec2({size.width - 40, size.height - 70}); |
| 137 | |
| 138 | float x = ((float)rand() / (float)RAND_MAX) * (maxArea.x - minArea.x) + minArea.x; |
| 139 | float y = ((float)rand() / (float)RAND_MAX) * (maxArea.y - minArea.y) + minArea.y; |
| 140 | |
| 141 | auto col1 = _player1->getMainColor(); |
| 142 | auto cir = CircleWave::create(0.5f, {col1.r, col1.g, col1.b, 255}, 5.f, 50, true, false); |
| 143 | cir->setPosition({x, y}); |
| 144 | m_pHudLayer->addChild(cir, -1); |
| 145 | } |
| 146 | |
| 147 | void PlayLayer::showEndLayer() |
| 148 | { |
nothing calls this directly
no test coverage detected