当前位置 : 主页 > 手机开发 > 其它 >

cocos2d-iphone – 更改CCSprite的图像

来源:互联网 收集:自由互联 发布时间:2021-06-13
我已经创建了一些CCSprites使用spriteWithFile。 如何在运行时更改sprite的图像? 我需要定期更改一些sprite图像。 CCTexture *tex = [CCTexture textureWithFile:fileName];self.texture = tex;
我已经创建了一些CCSprites使用spriteWithFile。

如何在运行时更改sprite的图像?

我需要定期更改一些sprite图像。

CCTexture *tex = [CCTexture textureWithFile:fileName];
self.texture = tex;
网友评论