public override void BoltStartDone()
        {
            if (BoltNetwork.IsServer)
            {
                var token = new RoomProtocolToken()
                {
                    ArbitraryData = "My DATA",
                };

                BoltLog.Info("Starting Server");

                // Start Photon Room
                BoltMatchmaking.CreateSession(
                    sessionID: matchName,
                    token: token
                    );
            }
            else if (BoltNetwork.IsClient)
            {
                if (randomJoin)
                {
                    BoltMatchmaking.JoinRandomSession();
                }
                else
                {
                    ClientStaredUIHandler();
                }

                randomJoin = false;
            }
        }
 public override void BoltStartDone()
 {
     if (BoltNetwork.IsClient)
     {
         BoltMatchmaking.JoinRandomSession();
     }
 }
Exemple #3
0
 public override void BoltStartDone()
 {
     // If we pressed join game, join a random session
     if (BoltNetwork.IsClient)
     {
         BoltMatchmaking.JoinRandomSession();
     }
     else if (offlineMode)
     {
         BoltNetwork.LoadScene(GameData.ScenesInBuild.scenes[1]);
     }
 }
Exemple #4
0
    // Bolt Events

    public override void BoltStartDone()
    {
        if (BoltNetwork.IsServer)
        {
            var id        = Guid.NewGuid().ToString().Split('-')[0];
            var matchName = string.Format("{0} - {1}", id, _gameLevel);

            BoltMatchmaking.CreateSession(
                sessionID: matchName,
                sceneToLoad: _gameLevel
                );
        }
        else if (BoltNetwork.IsClient)
        {
            BoltMatchmaking.JoinRandomSession();
        }
    }
Exemple #5
0
        public override void BoltStartDone()
        {
            if (BoltNetwork.IsServer)
            {
                string matchName = Guid.NewGuid().ToString();

                BoltMatchmaking.CreateSession(
                    sessionID: matchName,
                    sceneToLoad: "NetworkedPaint_Game"
                    );
            }

            if (BoltNetwork.IsClient)
            {
                BoltMatchmaking.JoinRandomSession();
            }
        }