Example #1
0
 public void PutDown()
 {
     if (carrying != null)
     {
         carrying.PutDown();
         carrying = null;
     }
 }
Example #2
0
    void OnTriggerStay(Collider pick)
    {
        Liftable liftable = pick.GetComponent <Liftable> ();

        if (liftable != null)
        {
            liftable.enabled = true;
            if (Input.GetMouseButtonDown(0))
            {
                liftable.PickingUp(guide);
            }
            if (Input.GetMouseButtonUp(0))
            {
                liftable.PutDown();
            }
        }
    }