Ejemplo n.º 1
0
 //Would be better if when we pickedup an object, we attached a  "carried" script to it, that way
 //reseting back to the proper values is easier
 private void PickupObject(GameObject toPickUp)
 {
     carryingObject = Carried.PickUpObject(toPickUp, transform, localHandPos);
     //toPickUp.transform.SetParent(transform);
     //toPickUp.transform.localPosition = localHandPos;
     //carryingObject = toPickUp;
     //Collider2D coli = toPickUp.GetComponent<Collider2D>();
     //Rigidbody2D rb = toPickUp.GetComponent<Rigidbody2D>();
     //if(coli) coli.enabled = false;
     //if (rb) rb.bodyType = RigidbodyType2D.Kinematic;
     //isCarrying = true;
 }
Ejemplo n.º 2
0
 private void PickupObject(GameObject go)
 {
     carried = Carried.PickUpObject(go, handTransform);
 }