How do i simply change a sprite's image in cocos2d?

后端 未结 7 1299
逝去的感伤
逝去的感伤 2021-02-14 18:28

I\'ve tried

[[CCTextureCache sharedTextureCache] addImage: @\"still.png\"];

But I always end up with a distorted image for some reason. It\'s m

相关标签:
7条回答
  • 2021-02-14 19:09

    This simple one line can do your task.

    [sprite setTexture:[[CCTextureCache sharedTextureCache] addImage:@"slot.png"]];
    
    0 讨论(0)
提交回复
热议问题