Beispiel #1
0
        private IEnumerator Start()
        {
            yield return(null);

            MinimumWindowSize.Set(1472, 828);
            if (m_currentExperienceType == ExperienceType.HOME)
            {
                Screen.SetResolution(1472, 828, FullScreenMode.Windowed);
            }
            yield return(null);

            if (m_currentExperienceType == ExperienceType.HOME)
            {
                OpenLoginPage();
            }
            yield return(new WaitForSeconds(3));

            if (DateTime.Now > new DateTime(2020, 11, 6))
            {
                m_uiEngine.DisplayProgress("APP VALIDITY EXPIRED.\n\nPlease contact administrator for support.", true);
            }

#if LOCAL_TEST
            if (CurrentExperience != ExperienceType.HOME)
            {
                AllPlatformDependenciesLoaded(null, EventArgs.Empty);
            }
#endif
        }
Beispiel #2
0
        private void RPC_PrivateRoom(int senderId, string roomName)
        {
            Debug.LogError("RPC_PrivateRoom: " + senderId + " " + roomName);
            m_uiEngine.DisplayMessage(new MessageArgs()
            {
                Persist     = false,
                Block       = true,
                Text        = "Invited accepted.",
                BackEnabled = false,
                OkEnabled   = true,
            });

            Observable.TimerFrame(500).Subscribe(_ =>
            {
                m_network.EnterPrivateRoom(roomName, false);
                m_uiEngine.DisplayProgress("Loading: " + Selection.Location, true);

                //if (Array.Find(Network.Rooms, item => item.Name == roomName) != null)
                //{
                //    Debug.LogError("Room exists: " + roomName);
                //    m_network.EnterPrivateRoom(roomName, false);
                //}
                //else
                //{
                //    Debug.LogError("Room doesn't exist: " + roomName);
                //}
            });
        }
Beispiel #3
0
        public void CreateRoom(string roomName)
        {
            Debug.LogError("CreateRoom: " + PhotonNetwork.IsConnectedAndReady);
            if (!PhotonNetwork.IsConnectedAndReady)
            {
                m_uiEngine.DisplayResult(new Error()
                {
                    ErrorCode = Error.E_InvalidOperation,
                    ErrorText = "Not connected to multiplayer server yet."
                });
                return;
            }

            m_uiEngine.DisplayProgress("Creating room: " + roomName);
            RoomOptions options = new RoomOptions
            {
                IsVisible  = true,
                IsOpen     = true,
                MaxPlayers = 10
            };

            PhotonNetwork.CreateRoom(roomName, options);
        }