public override void OnFinished() { AnimationComponent animationComponent = this.GetBuffTarget().GetComponent <AnimationComponent>(); foreach (var animMapInfo in m_ReplacedAnimData) { animationComponent.RuntimeAnimationClips[animMapInfo.Key] = animMapInfo.Value; } animationComponent.PlayAnimByStackFsmCurrent(); m_ReplacedAnimData.Clear(); }
public override void OnExecute() { ReplaceAnimBuffData replaceAnimBuffData = this.BuffData as ReplaceAnimBuffData; AnimationComponent animationComponent = this.GetBuffTarget().GetComponent <AnimationComponent>(); foreach (var animMapInfo in replaceAnimBuffData.AnimReplaceInfo) { this.m_ReplacedAnimData[animMapInfo.StateType] = animationComponent.RuntimeAnimationClips[animMapInfo.StateType]; animationComponent.RuntimeAnimationClips[animMapInfo.StateType] = animMapInfo.AnimName; } animationComponent.PlayAnimByStackFsmCurrent(); this.BuffState = BuffState.Running; }