Room Manager HUD

This class is an important component that makes up the user interface of the network manager. The user can create rooms, join rooms and view existing rooms through this interface.

Members

  1. offsetX ve offsetY:

    1. These values adjust the position of the interface on the screen.

  2. _roomNameField ve _maxPlayers:

    1. Holds the values of the room name and maximum number of players fields.

  3. _isServer:

    1. Indicates whether it is in server mode.

  4. _showingRoomList:

    1. Oda listesinin görüntülenip görüntülenmediğini belirtir.

  5. _scrollPosition:

    1. Stores the scroll position while viewing the room list.

  6. backgroundStyle:

    1. Defines the background style of the interface.

Methods

  • OnGUI()
    • Unity GUI events are handled in this method. Different interfaces are shown depending on the network connection status.

  • ShowRoomButtons()
    • Displays room creation and joining buttons.

  • ShowCurrentRoom(RoomInfo roomInfo)
    • Displays the current room's information and the "Leave Your Room" button.

  • ShowRoomList()
    • Displays the room list. The server provides the room close button, and the client provides the room join button.

  • MakeTex(int width, int height, Color color)
    • Creates a solid color texture of the specified dimensions and color.

Last updated