Changing image of a skspritenode()
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This is how I add my player's texture/image: Player = SKSpriteNode(imageNamed:"player8") How do I change the players texture/image without adding or deleting spritenodes? 回答1: You assign a different texture : player = SKSpriteNode(imageNamed:"player8") Sometime later: player.texture = SKTexture(imageNamed:"player123") Hint: it is bad style to begin variable, property and method names with an uppercase character as it makes them appear to be classes. 文章来源: Changing image of a skspritenode()