pause
現在、resume
、 、メソッドでアニメーションを制御するために cocos2d Director を使用していstopAnimation
ます。Director を使用して、アニメーションが再生された時間を返すこともできますか?
私は現在この方法を使用しています:
-(void)stopAnimation:(id)sender {
//Timer initialized elsewhere: startTimer = [NSDate timeIntervalSinceReferenceDate];
//Do other method stuff here
[[Director sharedDirector] stopAnimation];
stopTimer = [NSDate timeIntervalSinceReferenceDate];
elapsedTime = (stopTimer - startTimer);
NSLog(@"elapsedTime = %f", elapsedTime);
}