public void Initialize(WaitingRoomUI _WaitingRoomUI)
    {
        if (PhotonNetwork.IsMasterClient)
        {
            m_StartButton.SetActive(true);
            m_ReadyButton.SetActive(false);
            m_CancelButton.SetActive(false);
        }
        else
        {
            m_StartButton.SetActive(false);
            m_ReadyButton.SetActive(true);
            m_CancelButton.SetActive(false);
        }

        m_WaitingRoomUI = _WaitingRoomUI;
        Room room = PhotonNetwork.CurrentRoom;

        m_RoomNameText.text = room.Name;
        m_SceneName         = NetworkManager.Instance.RoomController.GetRoomPropertie <string>(WaitingRoomUI.m_SceneNameKey);
        m_GameName          = NetworkManager.Instance.RoomController.GetRoomPropertie <string>(WaitingRoomUI.m_GameNameKey);
        m_GameNameText.text = m_GameName;
        NetworkManager.Instance.RoomController.SetLocalPlayerProperties(WaitingRoomSlot.m_CharacterID, InventoryManager.Instance.GetPlayerModelName());
        NetworkManager.Instance.RoomController.SetLocalPlayerProperties(WaitingRoomSlot.m_ReadyKey, false);
        WaitingRoomUpdateQuery();
    }
Beispiel #2
0
    //public bool canCreateRoom = true;

    //public bool checkFind = false;
    void Awake()
    {
        if (Instance != null && Instance != this)
        {
            // If that is the case, we destroy other instances
            Destroy(gameObject);
        }

        // Here we save our singleton instance
        Instance = this;
    }