0
아래 코드에서 샘플 작업 중 스프라이트의 이미지를 변경하고 싶습니다.일련의 작업 중 스프라이트의 이미지를 변경하는 방법
spriteActions = [CCRepeatForever actionWithAction:
[CCSequence actions:
[CCShow action],
[CCDelayTime actionWithDuration:1.5],
[CCHide action],
[CCDelayTime actionWithDuration:5.0],
[CCShow action],
[CCDelayTime actionWithDuration:3.0],
// I would like to change the sprite image here before completing the remaining actions.
//I want this line here: sprite = [CCSprite SpriteWithFile:@"newSpriteImage.png"];
[CCMoveTo actionWithDuration:2.0 position:newSpritePos],
[CCHide action],
[CCDelayTime actionWithDuration:2.0],
nil]];
[sprite runAction:spriteActions];
감사합니다.
가 cccallblock 또는 cccallfunc 작업을 추가 – LearnCocos2D