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; }
//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); }
public override void OnConnected() { base.OnConnected(); CBUG.Do("Connected!"); currentServerUserDepth = ServerDepthLevel.InServer; }