【发布时间】:2013-07-16 04:55:40
【问题描述】:
我想从图库中选择玩家图像,或者我可以从 cam 中拍照,并且我需要在玩家移动时为这些图像设置动画。我是 cocos2d 的新手,任何人都可以帮助我吗?
【问题讨论】:
-
[playerSprite setTexture:[[CCTextureCache sharedTextureCache] addImage:@"playerWithShield.png"]];
-
我需要动态拍照,应该应用到玩家图像
-
[playerSprite setTexture:[[CCTextureCache sharedTextureCache] addImage:[UIImage imageNamed:[NSString stringwithformat@"%@",yourimage]]]];
-
谢谢大佬,但我需要在玩家移动时显示 3-4 个动画......
-
你可以使用 nstimer 来解决这个问题@Raj
标签: ios iphone cocos2d-iphone cocos2d-x