private void Start() { animationContoller = GetComponent <AnimationController>(); animationContoller.animator = GetComponent <Animator>(); animationContoller.TransitToWeaponTypeAnimation(weaponType); state = new Idle(animationContoller, this.transform, baseCharacterInput); }
void Start() { rigidbody = GetComponent <Rigidbody>(); agent = GetComponent <NavMeshAgent>(); agentTransform = GetComponent <Transform>(); animationController = GetComponent <AnimationController>(); animationController.animator = GetComponent <Animator>(); animationController.TransitToWeaponTypeAnimation(WeaponType.UnArmed); animationController.Idle(true); StartCoroutine(TargetCoroutine()); agent.stoppingDistance = 2f; agentState = new IdleAgent(this.transform, this.agent, this.animationController); }