Beispiel #1
0
        protected void PlayAnimation()
        {
            var abilityAnimation   = config.GetAbilityAnimation();
            var overrideController = GetComponent <Character>().GetOverrideController();
            var animator           = GetComponent <Animator>();

            overrideController[DEFAULT_ATTACK] = abilityAnimation;
            animator.SetTrigger("Attack");
        }
Beispiel #2
0
        protected void PlayAbilityAnimation()
        {
            var animatorOverrideController = GetComponent <Character>().GetAnimatorOverrideController();
            var animator = GetComponent <Animator>();

            animator.runtimeAnimatorController         = animatorOverrideController;
            animatorOverrideController[DEFAULT_ATTACK] = config.GetAbilityAnimation();
            animator.SetTrigger(ATTACK_TRIGGER);
        }
Beispiel #3
0
 public void SetConfig(AbilityConfig configToSet)
 {
     config   = configToSet;
     animClip = config.GetAbilityAnimation();
 }
Beispiel #4
0
 private void SetupAbilityAnimation(AbilityConfig ability)
 {
     animator.runtimeAnimatorController          = animatorOverrideController;
     animatorOverrideController[DEFAULT_ABILITY] = ability.GetAbilityAnimation(); //remove const
 }