Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* *
- * <summary>
- * Periodically checks if a 2nd player has joined, if the user is waiting and if the model UI has been instantiated.
- * If all these conditions are met, the UI shifts accordingly.
- * </summary>
- * */
- if (PhotonNetwork.playerList.Length > 1 && !modelUI.gameObject.activeSelf && waitingUI.gameObject.activeSelf) {
- waitingUI.gameObject.SetActive (false);
- modelUI.gameObject.SetActive (true);
- }
- /* *
- * <summary>
- * If user disconnects during character selection, reverts to waiting menu state.
- * In the future, this will work after a character has been selected as well.
- * </summary>
- * */
- if (PhotonNetwork.playerList.Length == 1 && modelUI.gameObject.activeSelf && !waitingUI.gameObject.activeSelf) {
- modelUI.gameObject.SetActive (false);
- waitingUI.gameObject.SetActive (true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement