public void JoinRoom(RoomInfo aRoomInfo) { int minLevel = 0; int maxLevel = 50; int playerLevel = BrainCloudStats.Instance.GetStats()[0].m_statValue; if (aRoomInfo.CustomProperties["roomMinLevel"] != null) { minLevel = (int)aRoomInfo.CustomProperties["roomMinLevel"]; } if (aRoomInfo.CustomProperties["roomMaxLevel"] != null) { maxLevel = (int)aRoomInfo.CustomProperties["roomMaxLevel"]; } if (playerLevel < minLevel || playerLevel > maxLevel) { m_dialogDisplay.DisplayDialog("You're not in that room's\nlevel range!"); } else if (aRoomInfo.PlayerCount < aRoomInfo.MaxPlayers) { m_state = eMatchmakingState.GAME_STATE_JOIN_ROOM; if (!PhotonNetwork.JoinRoom(aRoomInfo.Name)) { m_state = eMatchmakingState.GAME_STATE_SHOW_ROOMS; m_dialogDisplay.DisplayDialog("Could not join room!"); } } else { m_dialogDisplay.DisplayDialog("That room is full!"); } }
public void OnSelected() { DialogDisplay.DisplayDialog(Tree); }
private void SendStartingMessage() { DialogDisplay.DisplayDialog(Introduction); }