I was wondering if it is posable to use Director Class to make a pause menu?
I have a button that open a new screen (pause menu) on top of the level screen (the problem is it does not stop the game!). Do you open a pause menu in a new screen? And can you use Director Class?
Also, what code would I need?
In my game I have a ball (That rolls around!). I was wondering if I can “set a objective point” with Director Class. Is this posable? When the ball made contact with it, it would use Director Class to open a new screen (level 2). Is this how this should be done? If so, how can I use Director Class to do this?
I’m not sure if this is the best way… But it’s a way.
I made my pause menu as a graphical overlay. I put as many buttons on it as I wanted. And for functionality, I set up a state machine to handle the state of the game based on if the pause menu was up.
For your second question, I’d set up something that triggers a scene change on collision.
Hope that helps a bit… [import]uid: 30914 topic_id: 6798 reply_id: 36146[/import]
as for question 2, yes you can implement your objective point in whatever manner you want to implement, and when your program knows the objective is reached, use director class’s change scene function.
for. e.g. if you are using physics body at objective point to determine if your ball has reached that point (and checking for collision with that physics body) then in your collision handler you can add director:changeScene statement to move to next scene (level) [import]uid: 48521 topic_id: 6798 reply_id: 36218[/import]