Esempio n. 1
0
        public override void OnVRPlayerDeath(PhysicalVRPlayer player)
        {
            if (player != _player)
            {
                throw new Exception("The passed player is not the same as the saved player");
            }

            _player = null;

            if (CloneManager.Instance.GetNumClones() == 0) // this is a game over, go to UI
            {
                TransportUtils.TransportTo(VRManager.Instance.Player.transform, VRManager.Instance.Player.transform.position, VRManager.Instance.Player.transform.rotation, new Vector3(0f, 40f, 0f), Quaternion.identity, 5f, delegate
                {
                    PointerRay.SetEnabled(true);
                    PointerRay.OnAnyButtonClicked = delegate
                    {
                        FindPlayer();

                        PointerRay.SetEnabled(false);
                        PointerRay.OnAnyButtonClicked = null;
                    };
                });
                return;
            }

            FindPlayer();
        }
Esempio n. 2
0
        public override void OnGameModeStarted()
        {
            VRManager.Instance.Player.Scale = 1f;
            VRManager.Instance.Player.LeftController.ColliderActive  = true;
            VRManager.Instance.Player.RightController.ColliderActive = true;
            VRManager.Instance.Player.LeftController.RendererActive  = true;
            VRManager.Instance.Player.RightController.RendererActive = true;

            VRManager.Instance.Player.transform.position = new Vector3(0f, 40f, 0f);

            PointerRay.SetEnabled(true);
        }
Esempio n. 3
0
 public override void OnGameModeQuit()
 {
     PointerRay.SetEnabled(false);
 }