// Start is called before the first frame update void Start() { anim = GetComponent <Animator>(); agent = GetComponent <NavMeshAgent>(); //Initial State currentState = new RM_Advance(transform, agent, anim, target, visDis, shootDis); }
// Update is called once per frame void Update() { currentState = currentState.Process(); state = currentState.name; }