What do you guys think would be best practice for having a global GUI in a game? For instance let's say I have a mute button that I want to appear on each of my menus and in-game. Each menu is its own scene as well as the in-game scene. I could recreate the global GUI in each scene, but that seems like a bit overkill, and wouldn't work well with transitions. Is there any easy way to have this global GUI reside on top of each scene?
Global GUI (above scene)(3 posts) (3 voices)
I would create a base scene object and then have all my scenes descend from that scene object.
That way I would not have to add it to every scene. It would just be part of any scene I create using that base layer.
Then in the future if I wanted to add other items to the scene in the main hud I could just add it at the base class and it would apply to all of the descendants.
I think global GUI would be nice sometimes. Or even necessary by design. It may look nicer when GUI remains untransformed while scene transitions.
I think, it would be a great feature if we can add global CCLayer, which is not affected by scene transitions.Posted 1 year ago #
You must log in to post.