示例#1
0
 void updateScrubbers(manipulator m)
 {
     if (manips[m].trigger && manips[m].colliding && m.emptyGrab)
     {
         scrubberCandidate = scrubberActive = manips[m];
         player.grabScrub(true);
     }
     else
     {
         player.grabScrub(false);
     }
 }
示例#2
0
    void OnCollisionExit(Collision coll)
    {
        manipulator m = coll.transform.GetComponent <manipulator>();

        if (m == null)
        {
            return;
        }
        if (manips.ContainsKey(m))
        {
            manips[m].colliding = false;
            if (scrubberCandidate == manips[m])
            {
                scrubberCandidate = null;
                scrubIndicator.gameObject.SetActive(false);
            }
        }
    }
示例#3
0
    void OnCollisionEnter(Collision coll)
    {
        manipulator m = coll.transform.GetComponent <manipulator>();

        if (m == null)
        {
            return;
        }
        if (manips.ContainsKey(m))
        {
            manips[m].colliding = true;
        }
        else
        {
            manips[m] = new scrubber(m.transform, m.triggerDown, true);
        }
        m.hapticPulse();
        {
            scrubberCandidate = manips[m];
            scrubIndicator.gameObject.SetActive(true);
        }
    }