public static void AddAnimationEventType(eAnimationEventTypeMask animationEventTypeMask, eAnimationEventType animationEventType, string functionName, System.Type type, OnCreate onCreate) { AnimationEventTypeInfo animationEventTypeInfo = new AnimationEventTypeInfo(); animationEventTypeInfo.AnimationEventTypeMask = animationEventTypeMask; animationEventTypeInfo.AnimationEventType = animationEventType; animationEventTypeInfo.functionName = functionName; animationEventTypeInfo.type = type; animationEventTypeInfo.onCreate = onCreate; animationEventInfoList.Add(animationEventTypeInfo); }
public static void SetAnimationEventType(AnimationEventInfo animationEventInfo, eAnimationEventType animationEventType) { if (animationEventInfoList == null) { //Init(); Debug.LogError("AnimationEventUtil Init Error"); return; } foreach (AnimationEventTypeInfo animationEventTypeInfo in animationEventInfoList) { if (animationEventTypeInfo.AnimationEventType == animationEventType) { animationEventInfo.FunctionName = animationEventTypeInfo.functionName; return; } } animationEventInfo.FunctionName = string.Empty; }