private void SetUpAnimator() { characterStats.amWalking += AmIWalking; callingAttack += Attack; aIAnim.runtimeAnimatorController = animOverRide; animOverRide["DEFAULT_IDLE_ANIMATION"] = idleClip; animOverRide["DEFAULT_WALK_ANIMATION"] = walkClip; animOverRide["DEFAULT_ATTACK_ANIMATION"] = attackClip; SetAnimationSpeed(characterStats.GetMovementSpeed(), characterStats.GetAttackSpeed()); }
private void SetRefrences() { playerAnim = this.GetComponent <Animator>(); weaponAnim = this.GetComponentInChildren <Weapon_Controller>().GetComponent <Animator>(); armourAnim = this.GetComponentInChildren <Armour_Controller>().GetComponent <Animator>(); charStats = this.GetComponent <Character_Stats>(); equipmentManager = this.GetComponent <Equipment_Manager>(); equipmentManager.equipWeapon += EquipWeaponForAnim; charStats.callingDeath += LiveOrDie; callingAttack += BodyAttackAnim; equipmentManager.restartAnimationEvent += AnimationSyncer; }