| 194 | } |
| 195 | |
| 196 | bool TextureETC1Alpha::init() |
| 197 | { |
| 198 | if (!TextureDemo::init()) |
| 199 | return false; |
| 200 | |
| 201 | auto& canvasSize = getContentSize(); |
| 202 | _background = LayerColor::create(Color4B(15, 19, 42, 255), canvasSize.width, canvasSize.height); |
| 203 | _background->setIgnoreAnchorPointForPosition(false); |
| 204 | _background->setAnchorPoint(Vec2::ANCHOR_MIDDLE); |
| 205 | |
| 206 | auto s = Director::getInstance()->getWinSize(); |
| 207 | _background->setPosition(Vec2(s.width / 2, s.height / 2)); |
| 208 | this->addChild(_background); |
| 209 | |
| 210 | addNewSpriteWithCoords(Vec2(s.width / 2, s.height / 2)); |
| 211 | return true; |
| 212 | } |
| 213 | |
| 214 | void TextureETC1Alpha::addNewSpriteWithCoords(Vec2 p) |
| 215 | { |
nothing calls this directly
no test coverage detected