| 23 | |
| 24 | |
| 25 | static std::string getTextureString_PromoSprite(std::string texture) { |
| 26 | |
| 27 | auto pos = texture.find("."); |
| 28 | if (pos != std::string::npos && GameManager::getInstance()->isHigh()) { |
| 29 | texture.insert(pos, "-hd"); |
| 30 | } |
| 31 | return texture; |
| 32 | } |
| 33 | |
| 34 | PromoItemSprite::PromoItemSprite(const char* spriteStr, std::function<void(Node*)> callback) { |
| 35 | m_pSprite = ax::Sprite::create(getTextureString_PromoSprite(spriteStr)); |