- Home /
Tab to show different room for poker table?
Hi all, I am planning to create a game like poker. Where people will see a lobby initially and from there they can connect to two different rooms to play poker simultaneously. I was hoping to achieve this with "Tab" functionality. Where the first tab will be the lobby, second the first room player connects to and the third is the second room player connects to.
I am kinda confused on how to achieve this. If lobby and room are two separate scene, can I open one scene for lobby and two duplicate scene for the rooms? If not, what is the best way? Only one way I can think of is, having the lobby and two rooms on a single scene and have the camera move to different location based on which tab is being clicked.
Please let me know what you think is best.
Thanks
Answer by ABerlemont · Jan 03, 2014 at 03:47 PM
If I understood you don't want to show multiple tables at the same time on the screen ?
Then the simplest idea would be to have only one table in the scene that will update when you change tabs. You store every bit of information for a table that will allow you to update that table when you click on a new tab. That class can be instantiated for mulitple tables.
Hope that helps
Answer by robhuhn · Jan 03, 2014 at 03:55 PM
If lobby and room are two separate scene, can I open one scene for lobby and two duplicate scene for the rooms?
You can create the lobby and a table in separate scenes and merge them into the current game scene using Application.LoadLevelAdditive (or async). That will load all the objects in your lobby/table scene into the current scene but you then have to manage these objects by yourself e.g. if you want to remove a table again - Parenting could be helpful here to group objects of a specific scene.