Hi there,
I’m working up a demo where a couple of little games would show up in a panel. There is a main menu that you bounce around to select things (the games as well as other apps.)
When a single game is running, it takes up the whole panel. When two or more are running, they run in a “mini” format. Also, when a game is running, a special “return to game” button appears in the main menu.
This is a click through dog and pony show demo. It’s not a production app, but it has to work well enough to be played around with by internal clients. So it has to work well.
Right now I have some variables set up like so:
var gameActive:Boolean = false;
var gameDual:Boolean = false;
In my launch game and menu function, I am checking these (and one or two other) variables to see if I should do things like show a mini version of the game or show the return to game button. As I add features though, this is becoming slightly unwieldy.
The key issue is the games. Let’s say I have only two. I could make an array, and then load in the game name when a game is launched. I could check this array in my functions to see not only if games are launched, but which game is launched so I can use the full or mini games as appropriate.
Is this a good approach, or is there a better way? I’m rusty with my coding and not super comfortable making objects right now. But I could go that way if it was the best.