Ejemplo n.º 1
0
 /// <summary>
 /// Create and display the teleport area and beam.
 /// </summary>
 protected override void OnTriggerValid()
 {
     if (TeleportBeam == null || TrackedDevice.GetOutput().gameObject.GetComponent <TeleportBeam>() == null)
     {
         TeleportBeam = TrackedDevice.GetOutput().gameObject.AddComponent <TeleportBeam>();
     }
     TeleportBeam = TrackedDevice.GetOutput().gameObject.GetComponent <TeleportBeam>();
     TeleportBeam.TeleportEnabled = true;
 }
Ejemplo n.º 2
0
 private void Update()
 {
     if (_teleportBeam == null)
     {
         _teleportBeam = _showBeamAction.TeleportBeam;
     }
     _showBeamAction.Update(_showBeamTrigger.IsValid() && !_teleporting);
     if (_teleportTrigger.IsValid() && _showBeamAction.TeleportBeam.IsValid() && _coroutine == null)
     {
         _coroutine = _teleportBeam.StartCoroutine(FadeAndTeleport());
     }
 }