Hey guys I am building an app that requires a timer to see how long the player has been playing on that certain level. I have two problems. One is that I have no idea how to make a timer. The second problem is that I really do not know how to take away the one on the bottom left.
How do I take away or fix the bottom left timer in Cocos2d application ?!?
(5 posts) (3 voices)-
Posted 1 year ago #
-
hi,
I dont think we have timers in cocos2d. Instead you may like to use a scheduler of 1 second and keep incrementing the time variable on each tick.
[self schedule:@selector(tick) interval:1.0];i am myself new to cocos2d so there may be a better way to do this. Also I think what you mean by the timer on bottom left is the FPS counter.
Posted 1 year ago # -
Hey Omer-- Maiko here.
I take it you are talking about the Frames Per Second display in white?
If you go into your *AppDelegate.m file in your project and scroll down to
[[CCDirector sharedDirector] setDisplayFPS:YES]
in the -applicationDidFinishLaunching portion,
change the bool setDisplayFPS: to NO
and you should be set homey.
Posted 1 year ago # -
Thank you so mach it worked.
Posted 1 year ago # -
you're welcome good sir.
Posted 1 year ago #
Reply
You must log in to post.