Example #1
0
 /// <summary>
 /// Start is called on the frame when a script is enabled just before
 /// any of the Update methods is called the first time.
 /// </summary>
 private void Start()
 {
     characterMotor.Init(transform, GetComponent <Animator>(), GetComponent <Rigidbody>(), GetComponent <CapsuleCollider>());
     animatorHandler.Init(GetComponent <Animator>(), transform, characterMotor);
     inverseKinematics.Init(GetComponent <Animator>());
 }
 /// <summary>
 /// Awake is called when the script instance is being loaded.
 /// </summary>
 ///
 /// <remarks>
 /// Awake is called only once during the lifetime of the script instance.
 /// Awake is always called before any Start functions.
 /// This allows you to order initialization of scripts.
 /// </remarks>
 protected virtual void Awake()
 {
     characterMotor.Init(transform, GetComponent <Animator>(), GetComponent <Rigidbody>(), GetComponent <CapsuleCollider>());
     animatorHandler.Init(GetComponent <Animator>(), transform, characterMotor);
     inverseKinematics.Init(GetComponent <Animator>());
 }