Example #1
0
    public void SetTransform(Vector3 _forward, Vector3 _position)
    {
        if (motor == null)
        {
            motor = GetComponent <PlaneMotor>();
        }

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