private void OnEnable() { AttackComp = GetComponentInChildren <AttackAnimator>(); GetComponentInChildren <Animator>().runtimeAnimatorController = AnimationController; weapons.ForEach(t => t.SetActive(true)); ObserverCollection.Call(StateEventLibrary.SUBSTATE_ENABLED); }
private void Update() { if (Target != null && !isMoving) { Target = null; print(gameObject.name); ObserverCollection.Call(StateEventLibrary.DESTINATION_REACHED); } UnitComponent.Animator.SetFloat("Speed", navMeshAgent.velocity.magnitude); }