Lobby
At the Lobby scene, we see only three root gameobjects.
- Menu - the principal object that will be discussed next
- Eventsystem - gameobject, which is essential for Unity UI interaction
- AudioListener - gameobject, which provides the ability to hear music and sounds at the current scene
Menu gameobject is a Canvas which helps to display all the states of the player until the moment the session starts. At the first level we could see regime panels and main menu buttons.
Switching between regimes is represented by a simple State Machine with three states with MenuUIState as a base class.
- Idle is the initial state of UI. From this state, you could choose Singleplayer or Multiplayer regime.
- Singleplayer state provides a level selection panel from where any level could be immediately loaded for the current player.
- Multiplayer state opens the panel, which is another independent UI State Machine with MultiplayerUIState as a base class.
- Login state is the initial state where we should enter a nickname and launch the process of network connection
- Connecting is an intermediate state which shows loading animation while the connection process is in progress.
- InLobby is a state which we are in after connection is established. Here we have two possibilities: Join room (RoomJoining state) or create our own room (RoomCreation state). Both these states resemble the Connecting state (loading animation during the corresponding process).
- InRoom is the final state and the result of joining room and room creation processes. Here we can choose any vacant slot and wait until other players join the room.
Created with the Personal Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source