請問如何在sprite 換圖,試了很多方法,也不行
properties: {
arrow: cc.Sprite,
}
onLoad: function () {
var image2 = cc.url.raw("resources/Texture/arrow3.png");
var texture2 = cc.textureCache.addImage(image2);
this.arrow.spriteFrame = new cc.SpriteFrame(texture2);
}