1
我目前正在使用cocos2d导演来控制我的动画,使用pause
,resume
和stopAnimation
方法。是否也可以使用导演返回动画播放的时间?cocos2d导演可以返回时间吗?
我目前使用这种方法:
-(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);
}