[self runAction:[CCFadeOut actionWithDuration:0.0f]];
// Fades out the sprite if it was visible before
[self setDisplayFrame: [[CCSpriteFrameCache sharedSpriteFrameCache]
spriteFrameByName:@"teleport.png"]];
action = [CCSpawn actions:
[CCRotateBy actionWithDuration:1.5f angle:360],
[CCFadeIn actionWithDuration:1.5f],
nil];
这里制作了一个很好的传送效果,让‘teleport’隐形,逐渐fadeIn,并旋转一圈:360度。
可以用于creep登场等