| 238 | } |
| 239 | |
| 240 | Texture2D* SpriteFrame::getTexture() |
| 241 | { |
| 242 | if (_texture) |
| 243 | { |
| 244 | return _texture; |
| 245 | } |
| 246 | |
| 247 | if (!_textureFilename.empty()) |
| 248 | { |
| 249 | return Director::getInstance()->getTextureCache()->addImage(_textureFilename); |
| 250 | } |
| 251 | // no texture or texture filename |
| 252 | return nullptr; |
| 253 | } |
| 254 | |
| 255 | void SpriteFrame::setPolygonInfo(const PolygonInfo& polygonInfo) |
| 256 | { |
nothing calls this directly
no test coverage detected