Need Guidance

In my game i ve a situation where tapping over character there should appear a mini game in a pop up window user can play it or just close it. My problem is how to implement a pop up window at the same time there should not be any event listening in the main game.

help… thanks [import]uid: 42177 topic_id: 10553 reply_id: 310553[/import]

Hey there,

Either change scenes if you are using director (this is most practical) or if it must be in the same screen you should simply temporarily remove the event listeners.

There are of course more elegant ways to go about things but director is the easiest :wink:

Peach [import]uid: 52491 topic_id: 10553 reply_id: 38411[/import]

hi peach… ya it’s on same screen. And the problem is that in my game there are many event listeners and timer.so it’s not very much efficient way… can u suggest other way. [import]uid: 42177 topic_id: 10553 reply_id: 38418[/import]

Is there a reason that it HAS to be on the same screen?

I mean, a practical reason? If it’s a visual reason you could do a mock up in another screen.

Would that work for you, or no? [import]uid: 52491 topic_id: 10553 reply_id: 38519[/import]

Hi Peach…
In my game scene there are different number of shelf where user has to drop customer based on their need that is indicate on their head thought bubble animation, shelf contains limited number of goods and after certain time of purchases, shelf gets vacant. To restock the shelf i have to implement a mini game which will pop up on the same scene on tapping on the vacant shelf. Also there are timers implemented over the individual customer for scoring purpose.And while playing mini game timer of all customer should run to indicate the user that he/she is running out of time And on a certain amount of time i have to change the state of each customer available on game scene, to indicate the user i am applying animation over the customers.
This is why i need to implement it on the same scene. I am using director class to manage level transition already. Is it possible with director class to move on another screen and again come back to previous screen with resumed screen with all data along with the timer status,which is need to be keep running while on mini game scene… thanks [import]uid: 42177 topic_id: 10553 reply_id: 38544[/import]

Add a variable like “minigame” or something, change it from false to true when a minigame is up, then false when it closes.

Have other events (underneath) only fire when it’s false.

There are multiple ways to do this kind of thing if you check out samples available; find the one that works for you and that you can understand :slight_smile:

Peach [import]uid: 52491 topic_id: 10553 reply_id: 38574[/import]

thanks Peach… i got it. [import]uid: 42177 topic_id: 10553 reply_id: 38662[/import]