示例#1
0
	private void InitInputDevice()
	{
		if(null != inputObject)
			input = inputObject.GetComponent<IPanInputDevice>();
		if(input == null)
			input = GetComponent<IPanInputDevice>();
		if(input == null)
			throw new UnityException("Can not Init InputDevice");
		handType = input.GetHandType();
	}
 public void OnDrop(IPanInputDevice input, FixedJoint joint)
 {
     joint.connectedBody = null;
     GameObject.DestroyImmediate(gameObject);
 }
 public void OnPickUp(IPanInputDevice input, FixedJoint joint)
 {
     this.input = input;
     joint.connectedBody = transform.GetComponent<Rigidbody>();
  
 }