MARK: create, init, dealloc
| 50 | |
| 51 | // MARK: create, init, dealloc |
| 52 | Sprite* Sprite::createWithTexture(Texture2D* texture) |
| 53 | { |
| 54 | Sprite* sprite = new Sprite(); |
| 55 | if (sprite->initWithTexture(texture)) |
| 56 | { |
| 57 | sprite->autorelease(); |
| 58 | return sprite; |
| 59 | } |
| 60 | AX_SAFE_DELETE(sprite); |
| 61 | return nullptr; |
| 62 | } |
| 63 | |
| 64 | Sprite* Sprite::createWithTexture(Texture2D* texture, const Rect& rect, bool rotated) |
| 65 | { |
nothing calls this directly
no test coverage detected