Ejemplo n.º 1
0
 /// <summary>
 /// Finished moving once object's velocity is 0
 /// </summary>
 public void FinishedMoving()
 {
     currentMoveable.HandleInputEnd(Input.mousePosition);
     currentMoveable.GetComponent <Rigidbody>().isKinematic = true;
     currentMoveable.GetComponent <Collider>().enabled      = false;
     currentMoveable = null;
     ToggleMoveableSelectable(true);
     start.enabled = true;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Set the current moveable object and start input
 /// </summary>
 /// <param name="moveable"></param>
 public void SetCurrentMoveable(GameObject moveable)
 {
     currentMoveable = moveable.GetComponent <DragRigidbody>();
     currentMoveable.GetComponent <Rigidbody>().isKinematic = false;
     StartCoroutine(EnableMoveableCollider());
     start.enabled = false;
     ToggleMoveableSelectable(false);
     currentMoveable.HandleInputBegin(Input.mousePosition);
 }