スプライトが触れたときにスプライトでアクションを実行したいのですが、これがアクション メソッドです。
-(void) spriteEffect
{
CCSprite *actionEffect = avatar;
id jump = [CCJumpBy actionWithDuration:1 position: ccp(0, 0) height:50 jumps:1];
id sequence = [CCSequence actions: jump, nil];
[actionEffect runAction:sequence];
}
さて、私の問題は、タッチアクションをスプライトに接続する方法がわからないことです。これを使うべきですか?
- (void)ccTouchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
Msp は、.plist が割り当てられた .png イメージにあります。