更改CCSprite的图像 [英] Changing the image of a CCSprite
本文介绍了更改CCSprite的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用spriteWithFile创建了一些CCSprites。
I have created a number of CCSprites using spriteWithFile.
如何在运行时更改sprite的图像?
How do I change the image for the sprite during runtime?
我需要定期更改一些sprite图片。
I need to change a few sprites images quite regularly.
推荐答案
CCTexture *tex = [CCTexture textureWithFile:fileName];
self.texture = tex;
这篇关于更改CCSprite的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文