public virtual void OnHeadsetCollisionDetect(HeadsetCollisionEventArgs e)
 {
     if (HeadsetCollisionDetect != null)
     {
         HeadsetCollisionDetect(this, e);
     }
 }
 public virtual void OnHeadsetCollisionEnded(HeadsetCollisionEventArgs e)
 {
     if (HeadsetCollisionEnded != null)
     {
         HeadsetCollisionEnded(this, e);
     }
 }
 private void OnHeadsetCollision(object sender, HeadsetCollisionEventArgs e)
 {
     if (lastGoodPositionSet)
     {
         SteamVR_Fade.Start(Color.black, 0f);
         this.transform.position = lastGoodPosition;
     }
 }
Example #4
0
    private void OnHeadsetCollisionDetect(object o, HeadsetCollisionEventArgs e)
    {
        string tag = e.collider.gameObject.tag;

        if (tag == "Obstacle" || tag == "OracleObstacle")
        {
            EventManager.TriggerEvent("Death");
        }
    }
Example #5
0
 public void HeadsetEnteredQuadrant(object sender, HeadsetCollisionEventArgs e)
 {
     for (int i = 0; i < 9; i++)
     {
         if (e.collider == QuadrantColliders [i])
         {
             Move(i);
             return;
         }
     }
 }
Example #6
0
    protected virtual void OnHeadsetCollisionDetect(object sender, HeadsetCollisionEventArgs e)
    {
        // get name of object collided with
        GameObject collidedObject = e.collider.gameObject;

        switch (collidedObject.name)
        {
        case "Reset":
            HandleResetHit();
            break;

        case "Goal":
            HandleResetHit();
            break;

        default:
            break;
        }
    }
 private void HeadsetCollisionEnded(object o, HeadsetCollisionEventArgs e)
 {
     OnHeadsetCollisionEnded.Invoke(o, e);
 }
 private void HeadsetCollisionDetect(object o, HeadsetCollisionEventArgs e)
 {
     OnHeadsetCollisionDetect.Invoke(o, e);
 }
Example #9
0
 private void CollisionDetect_HeadsetCollisionEnded(object sender, HeadsetCollisionEventArgs e)
 {
     fadeUI.SetActive(false);
 }
 private void EnableTeleport(object sender, HeadsetCollisionEventArgs e)
 {
     enableTeleport = true;
 }
 private void DisableTeleport(object sender, HeadsetCollisionEventArgs e)
 {
     enableTeleport = false;
 }
Example #12
0
 protected virtual void OnHeadsetCollisionEnded(object sender, HeadsetCollisionEventArgs e)
 {
 }
 public virtual void OnHeadsetCollisionDetect(HeadsetCollisionEventArgs e)
 {
     if (HeadsetCollisionDetect != null)
         HeadsetCollisionDetect(this, e);
 }
Example #14
0
 protected override void OnHeadsetCollisionEnded(object sender, HeadsetCollisionEventArgs e)
 {
     base.OnHeadsetCollisionEnded(sender, e);
     fadeMaterial.color = Color.clear;
 }
    private void HeadsetCollisionDetected(object sender, HeadsetCollisionEventArgs e)
    {
        var edibleObject = e.collider.GetComponent <Edible>();

        edibleObject?.OnEaten();
    }
 private void OnHeadsetCollision(object sender, HeadsetCollisionEventArgs e)
 {
     if (lastGoodPositionSet) {
         SteamVR_Fade.Start(Color.black, 0f);
         this.transform.position = lastGoodPosition;
     }
 }