-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
I have tweaked my local copy so that it invalidates the timer once all tweens have finished, and creates a new timer if needed at the top of addTweenOperation: instead. I believe this is better for large projects such as mine, as it cuts down on the number of instructions happening every second:
- (PRTweenOperation*)addTweenOperation:(PRTweenOperation*)operation
{
if (timer == nil)
{
timer = [NSTimer scheduledTimerWithTimeInterval:kPRTweenFramerate target:self selector:@selector(update) userInfo:nil repeats:YES];
}
...
And again at the bottom of the update method:
...
if(tweenOperations.count == 0)
{
[timer invalidate];
timer = nil;
}
}
Let me know if I can pull this and add the code, I would be happy to!
Metadata
Metadata
Assignees
Labels
No labels