Ejemplo n.º 1
0
        protected override void Awake()
        {
            base.Awake();

            VSBApplication.Start(VSBApplicationType.Trainee);

            PhotonNetwork.OfflineMode = false;

            NetworkManager.Connect();

            if (!PhotonNetwork.InRoom)
            {
                JoinRoomWhenConnected();
            }
            else
            {
                this.createOfflineRoom         = false;
                this.reconnectWhenDisconnected = true;
                this.roomName = PhotonNetwork.CurrentRoom.Name;

                if (this.statusText)
                {
                    this.statusText.text = $"Network: Connected {(PhotonNetwork.OfflineMode ? " (offline mode)" : string.Empty)}";
                }
            }

            this.Terrain = this.GetComponentInChildren <Terrain>();
        }
Ejemplo n.º 2
0
        private void Awake()
        {
            VSBApplication.Start(VSBApplicationType.Instructor);

            NetworkManager.Connect();

            if (!PhotonNetwork.InLobby)
            {
                JoinLobbyWhenConnected();
            }
            else
            {
                if (this.statusText)
                {
                    this.statusText.text = $"Network: Connected";
                }
            }
        }
Ejemplo n.º 3
0
        protected override void Awake()
        {
            base.Awake();

            VSBApplication.Start(VSBApplicationType.Trainee);

            PhotonNetwork.OfflineMode = false;

            NetworkManager.Connect();

            if (!PhotonNetwork.InRoom)
            {
                JoinRoomWhenConnected();
            }
            else
            {
                this.reconnectWhenDisconnected = true;
                this.roomName = PhotonNetwork.CurrentRoom.Name;
            }
        }