Is this a good way to do this?

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
Jookia
Posts: 170
Joined: Wed Nov 19, 2008 1:11 am

Is this a good way to do this?

Post by Jookia »

I need to be able to run through different menus without hardcoding it. So I had an idea.

I have a main class which holds 'menu currentMenu' and 'menu nextMenu'. Each time I run() the device, I'll run() the currentMenu, same with a global eventReciever, I'll channel stuff through to the currentScene.

When the currentScene()'s run returns false, it'll change the scene to the nextScene.

Now, the problem here is.. Nothing, I just want to know if there's a better way of having menus.
trivtn
Posts: 132
Joined: Tue Jan 17, 2006 12:30 pm
Location: Viet Nam
Contact:

Post by trivtn »

This is the way. I 've made my menu :D
There's something is fantastic, there's nothing is absolute.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Sounds like you want some sort of state machine.

Travis
Post Reply