//getting component references void Start() { animator = GetComponentInChildren <Animator>(); switch (mType) { case MovementType.splineMove: hMove = GetComponent <splineMove>(); break; case MovementType.bezierMove: bMove = GetComponent <bezierMove>(); break; case MovementType.navMove: nAgent = GetComponent <UnityEngine.AI.NavMeshAgent>(); break; } }
//getting component references void Start() { animator = GetComponentInChildren<Animator>(); switch (mType) { case MovementType.splineMove: hMove = GetComponent<splineMove>(); break; case MovementType.bezierMove: bMove = GetComponent<bezierMove>(); break; case MovementType.navMove: nAgent = GetComponent<NavMeshAgent>(); break; } }