I used the code below to set the sprite with image
mysprite=cc.Sprite.create(“1.png”);
myprite.setPosition(position);
after some steps, I hope to change the image of my sprite from 1.png to 2.png
Is it possible?
I used the code below to set the sprite with image
mysprite=cc.Sprite.create(“1.png”);
myprite.setPosition(position);
after some steps, I hope to change the image of my sprite from 1.png to 2.png
Is it possible?
You could use cc.Sprite.setTexture