Beispiel #1
0
 IEnumerator RunGame()
 {
     gameState = BP_GameState.WaitForLocationSync;
     while (!AllPlayersHaveSyncedLocation())
     {
         yield return(null);
     }
     gameState = BP_GameState.WaitingForRolls;
 }
Beispiel #2
0
    public override void OnStartClient()
    {
        if (instance)
        {
            Debug.LogError("ERROR: Another GameSession!");
        }
        instance = this;

        networkListener             = FindObjectOfType <BP_Listener>();
        networkListener.gameSession = this;

        _networkTransmitter = GetComponent <BeerPongNetworkTransmitter>();

        if (gameState != BP_GameState.Lobby)
        {
            gameState = BP_GameState.Lobby;
        }
    }
Beispiel #3
0
 public override void OnStartServer()
 {
     networkListener   = FindObjectOfType <BP_Listener>();
     _arSessionManager = FindObjectOfType <BP_ARSessionManager>();
     gameState         = BP_GameState.Connecting;
 }
Beispiel #4
0
 public void OnCountdownCancelled()
 {
     gameState = BP_GameState.Lobby;
 }
Beispiel #5
0
 public void OnCountdownStarted()
 {
     gameState = BP_GameState.Countdown;
 }
Beispiel #6
0
 public void OnLeftLobby()
 {
     gameState = BP_GameState.Offline;
 }
Beispiel #7
0
 public void OnJoinedLobby()
 {
     gameState = BP_GameState.Lobby;
 }