有没有办法更改已经用另一张图片初始化的精灵的图像?
我尝试了:
if ([node.name isEqualToString:@"NameX"]) { SKAction *fadeOut = [SKAction fadeOutWithDuration:0.3]; SKAction *fadeIn = [SKAction fadeInWithDuration:0.3]; [self.sprite runAction:fadeOut]; [self runAction:fadeOut completion:^{ self.sprite = [SKSpriteNode spriteNodeWithImageNamed:@"NameY"]; [self.sprite runAction:fadeIn] }];
}