2
私はCCSequenceアクションを使用していますが、タッチが終了したらシーケンスをタッチして保持しながら、スプライトを特定のアクションで保持したい。cocos2D CCSequence時間の経過を保持する
-(BOOL) ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event{
id downward = [CCRotateTo actionWithDuration:0.1 angle:45];
id straight = [CCRotateTo actionWithDuration:0.1 angle:0];
id stable = [CCSequence actionWithDuration:1.0];
id upward = [CCRotateTo actionWithDuration:0.1 angle:-45];
id Seq = [CCSequence actions:downward, straight, stable, upward, nil];
[mySprite runAction:Seq];
}
-(void) ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event{
}
"id stable = [CCSequence actionWithDuration:1.0];"タッチがホールドしている間は、時間間隔のフロートに置き換えられます。タッチが終了するとリセットします。
ご迷惑をおかけして申し訳ありません。