예제 #1
0
 public override void OnJoinedLobby()
 {
     CBUG.Log("Lobby Joined!");
     CBUG.Log("Joining Random Room ...");
     if (needsNewRoom)
     {
         PhotonNetwork.CreateRoom(null, new RoomOptions()
         {
             MaxPlayers = 2, CleanupCacheOnLeave = false
         }, null);
     }
     else
     {
         //string sqlLobbyFilter = "GameStartTime = -1"; //todo ??? implement sql lobbying
         PhotonNetwork.JoinRandomRoom();
     }
     currentServerUserDepth = ServerDepthLevel.InLobby;
 }
예제 #2
0
    //public override void On

    public override void OnJoinedRoom()
    {
        CBUG.Log("Joined Room! Total Players: " + PhotonNetwork.CurrentRoom.PlayerCount);

        currentServerUserDepth = ServerDepthLevel.InRoom;

        SaveData("FirstTimeSetupDone", false);

        if (PhotonNetwork.IsMasterClient)
        {
            //spawn singletons
            foreach (var singleton in singletonNames)
            {
                SpawnObject(singleton);
            }
        }
        SaveData("FirstTimeSetupDone", true);
    }
예제 #3
0
 public override void OnConnected()
 {
     base.OnConnected();
     CBUG.Do("Connected!");
     currentServerUserDepth = ServerDepthLevel.InServer;
 }