[Spine] Using getContentSize to make spine-runtime supports the strategy of loading resources in cocos2d-x.

This commit is contained in:
James Chen 2013-06-06 14:22:51 +08:00
parent b462c9de82
commit 93597a5858
1 changed files with 5 additions and 2 deletions

View File

@ -35,8 +35,11 @@ void _AtlasPage_createTexture (AtlasPage* self, const char* path) {
CCTextureAtlas* textureAtlas = CCTextureAtlas::createWithTexture(texture, 4);
textureAtlas->retain();
self->rendererObject = textureAtlas;
self->width = texture->getPixelsWide();
self->height = texture->getPixelsHigh();
// Using getContentSize to make it supports the strategy of loading resources in cocos2d-x.
// self->width = texture->getPixelsWide();
// self->height = texture->getPixelsHigh();
self->width = texture->getContentSize().width;
self->height = texture->getContentSize().height;
}
void _AtlasPage_disposeTexture (AtlasPage* self) {