public static List <int> GetActionEffects(RuntimeAnimatorController controller, string actName) { if (controller == null) { Debug.LogError("controller为空"); return(new List <int>()); } string text = controller.get_name() + "-" + actName; if (!XUtility.effectsTime.ContainsKey(text)) { XUtility.effectsTime.Add(text, new List <int>()); for (int i = 0; i < controller.get_animationClips().Length; i++) { AnimationClip animationClip = controller.get_animationClips()[i]; if (animationClip.get_name().Equals(actName)) { for (int j = 0; j < animationClip.get_events().Length; j++) { AnimationEvent animationEvent = animationClip.get_events()[j]; if (animationEvent.get_functionName().Equals("Effect")) { XUtility.effectsTime.get_Item(text).Add(animationEvent.get_intParameter()); } } } } } return(XUtility.effectsTime.get_Item(text)); }
public void fx(AnimationEvent arg) { int intParameter = arg.get_intParameter(); if (intParameter != 0) { FXManager.Instance.PlayFX(intParameter, this.theTransform, Vector3.get_zero(), Quaternion.get_identity(), 1f, 1f, 0, false, 0, null, null, 1f, FXClassification.Normal); } }
public void OnSlowMotionIntroduction(AnimationEvent e) { if (!this.CheckEventIsValid(e)) { return; } CommandCenter.ExecuteCommand(this.root, new SlowMotionIntroductionCmd { time = e.get_intParameter() }); }
public void JumpFollow(AnimationEvent e) { if (!this.CheckEventIsValid(e)) { return; } CommandCenter.ExecuteCommand(this.root, new JumpFollowCmd { jumpFollow = e.get_intParameter() }); }
public void PointBPriority(AnimationEvent e) { if (!this.CheckEventIsValid(e)) { return; } CommandCenter.ExecuteCommand(this.root, new PointBPriorityCmd { number = e.get_intParameter() }); }
public override void OnFXEvent(FXEventCmd cmd) { AnimationEvent args = cmd.args; int intParameter = args.get_intParameter(); if (intParameter <= 0) { string text = "播放特效失败, 特效ID不合法"; UIManagerControl.Instance.ShowToastText(text); Debuger.Error(text, new object[0]); } CommandCenter.ExecuteCommand(base.get_transform(), new PlayActionFXCmd { fxID = intParameter, scale = DataReader <AvatarModel> .Get(this.resGUID).scale }); }