Class PlayerManager
This class manages player-related functionality, such as joining, leaving, and assigning colors. It also handles starting the game once players have joined.
Inheritance
object
PlayerManager
Namespace: Player
Assembly: cs.temp.dll.dll
Syntax
public class PlayerManager : MonoBehaviour
Fields
cards
A list of player join cards, which represent players in the UI.
Declaration
public List<PlayerJoinCard> cards
Field Value
| Type | Description |
|---|---|
| List<><PlayerJoinCard> |
Instance
The singleton instance of the PlayerManager class.
Declaration
public static PlayerManager Instance
Field Value
| Type | Description |
|---|---|
| PlayerManager |
playerColors
A list of colors assigned to players for identification.
Declaration
public List<Color> playerColors
Field Value
| Type | Description |
|---|---|
| List<><Color> |
playerSelect
The UI element used for player selection.
Declaration
public GameObject playerSelect
Field Value
| Type | Description |
|---|---|
| GameObject |
Methods
StartGame()
Starts the game if at least one player has joined.
Declaration
public void StartGame()