Is it to expensive to keep calling stop and start animation or should I just call pause and resume? I am playing through several videos and I need to have the animation off during the playback.
Is stoping and starting animation with the CCDirector expensive?
(8 posts) (3 voices)-
Posted 3 months ago #
-
Could use some help on this one!
Posted 3 months ago # -
Are you unhappy with the performance? If not don't spend time on something that is not impacting your ability to complete your vision.
Posted 3 months ago # -
I don't know if I am happy with the performance, because I haven't tried using pause or resume. I was hoping to get some insight on this subject without having to change things before I new enough about it.
Posted 3 months ago # -
The best thing is to experiment and try it.
Posted 3 months ago # -
The best thing is to experiment and try it.
Posted 3 months ago # -
So I went and checked the source code, which I highly suggest you do as well.
In ver 2.0,
- (void)setAnimationInterval:(NSTimeInterval)interval { animationInterval_ = interval; if(displayLink_){ [self stopAnimation]; [self startAnimation]; } }Is called from pause and resume. And looking at the description of CADisplayLink in the documentation I somehow doubt that is a very expensive object to create and destroy. I could be wrong but without experimenting I would say the way you want to do things in this regard doesn't matter.
Posted 3 months ago # -
Thanks I really appreciate the help!!!
Posted 3 months ago #
Reply
You must log in to post.