public void SetTransform(Vector3 _forward, Vector3 _position) { if (motor == null) { motor = GetComponent <PlaneMotor>(); } motor.TargetPosition = _position; motor.TargetDirection = _forward; }
private void OnEnable() { motor = GetComponent <PlaneMotor>(); //TODO }
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { mPlane = animator.GetComponent <Plane>(); mTrans = animator.transform; mMotor = animator.GetComponent <PlaneMotor>(); }