| 167 | } |
| 168 | |
| 169 | void GarageLayer::createStat(const char* sprite, const char* statKey) |
| 170 | { |
| 171 | const auto& size = Director::getInstance()->getWinSize(); |
| 172 | |
| 173 | auto stat = Sprite::createWithSpriteFrameName(sprite); |
| 174 | stat->setScale(.65); |
| 175 | stat->setPosition({size.width - 20, size.height - 14 - 20 * _stats}); |
| 176 | this->addChild(stat); |
| 177 | |
| 178 | auto statL = Label::createWithBMFont(GameToolbox::getTextureString("bigFont.fnt"), "0"); // GameStatsManager::sharedState()->getStat(statKey) |
| 179 | statL->setScale(.45); |
| 180 | statL->setAnchorPoint({1, 0}); |
| 181 | statL->setPosition({stat->getPositionX() - 16, stat->getPositionY() - 7}); |
| 182 | this->addChild(statL); |
| 183 | |
| 184 | _stats++; |
| 185 | } |
| 186 | |
| 187 | void GarageLayer::setupIconSelect() |
| 188 | { |
no test coverage detected