// Use this for initialization void Start() { navMesh = GetComponentInParent <NavMeshAgent2D>(); anim = GetComponent <FDAnimation>(); }