示例#1
0
        protected void PlayAbilityAnimation()
        {
            var animatorOverrideController = GetComponent <Character>().GetOverrideController();
            var animator = GetComponent <Animator>();

            animator.runtimeAnimatorController         = animatorOverrideController;
            animatorOverrideController[DEFAULT_ATTACK] = config.GetAnimationClip();
            animator.SetTrigger(ATTACK_TRIGGER);
        }
        protected void PlayAnimationClip()
        {
            Assert.IsNotNull(GetComponent <Character>().GetOverrideController(), "Please provide " + gameObject + " with an animator override controller.");
            var animatorOverrideController = GetComponent <Character>().GetOverrideController();
            var animator = GetComponent <Animator>();

            animator.runtimeAnimatorController         = animatorOverrideController;
            animatorOverrideController[DEFAULT_ATTACK] = config.GetAnimationClip();
            animator.SetTrigger(ATTACK_TRIGGER);
        }