ccspritebatchnode

How to resize the the animating sprite in cocos2d-x

ⅰ亾dé卋堺 提交于 2019-12-25 05:51:00
问题 I want to change the size of a Sprite which is animating. How can I do this ? I tried to change its size by using setScale property but it is not working here. where I am doing wrong ? CCArray* frames = CCArray::createWithCapacity(3); CCSpriteFrameCache* frameCache = CCSpriteFrameCache::sharedSpriteFrameCache(); char file[100] = {0}; for (int i = 0; i < 3; i++) { sprintf(file, "bird%d.png", i); CCSpriteFrame* frame = frameCache->spriteFrameByName(file); frames->addObject(frame); } CCAnimation

How to resize the the animating sprite in cocos2d-x

久未见 提交于 2019-12-13 05:04:06
问题 I want to change the size of a Sprite which is animating. How can I do this ? I tried to change its size by using setScale property but it is not working here. where I am doing wrong ? CCArray* frames = CCArray::createWithCapacity(3); CCSpriteFrameCache* frameCache = CCSpriteFrameCache::sharedSpriteFrameCache(); char file[100] = {0}; for (int i = 0; i < 3; i++) { sprintf(file, "bird%d.png", i); CCSpriteFrame* frame = frameCache->spriteFrameByName(file); frames->addObject(frame); } CCAnimation

Cocos2dx 2.1.4 Game, Continuos FPS drop and never recovers

[亡魂溺海] 提交于 2019-12-13 04:50:33
问题 I am creating a game using cocos2dx 2.1.4. Its FPS drops continuously , and never recover. Please find the details as follows Background about the way I am doing things:- Its game about scrolling down some shapes, each shape is made up of some square blocks.I have 7 kind of blocks. All loaded in a Sprite Sheet and using these blocks from this sprite sheet I create a shape. A level file is consist of these shapes. I load two levels at the same time one onscreen and another off screen to make

How can I retrieve the corresponding texture name from a GLuint?

自作多情 提交于 2019-12-12 04:44:45
问题 EDIT 5: Optimization level build settings: EDIT 4: I tried to change the build configuration putting all to "Debug" and then run for "testing". Weirdly enough it didn't crash for about 20 times (I kept load and unloading various GameScenes whith different assets). At the 21st time (even if not statistically relevant) I was about to think that it might not crash anymore but it crashed. The summary is still unavailable so I am wondering if I am doing it right or if there is some other issue..