두 스프라이트는 동시에 동일한 동작을 재생하고 첫 번째는 작동하지 않습니다.
-
06-07-2019 - |
문제
- (BOOL) ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
CocosNode* spHead = [self getChildByTag:tagHead];
CocosNode* spBody = [self getChildByTag:tagBody];
[spHead runAction:fadeOutAction];
[spBody runAction:fadeOutAction];
}
위의 코드와 같이, 나는 스프라이트가 동시에 어떤 행동을하기를 원하지만, 두 번째는 정확하게 작동하지만 첫 번째는 그렇지 않습니다.
도움이 필요합니다.
해결책 2
알아
- (bool) cctouchesended : (nsset *) touches withevent : (uievent ) 이벤트 {코코 노드 sphead = [self getchildbytag : taghead]; cocosnode* spbody = [self getchildbytag : tagbody];
[spHead runAction:fadeOutAction];
[spBody runAction:[[fadeOutAction copy] autorelease]];
}
그럼 괜찮아
다른 팁
당신의 페이드 아웃이 재창조를 처리하지 않습니까?
제휴하지 않습니다 StackOverflow