コード例 #1
0
        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);
        }
コード例 #2
0
        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;
        }