Esempio n. 1
0
 public override void OnStateEnter(UnityEngine.Animator animator, UnityEngine.AnimatorStateInfo stateInfo, int layerIndex)
 {
     if (!OnExit)
     {
         ReturnToPool(animator);
     }
 }
Esempio n. 2
0
        static StackObject *OnStateIK_11(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 5);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Experimental.Director.AnimatorControllerPlayable controller = (UnityEngine.Experimental.Director.AnimatorControllerPlayable) typeof(UnityEngine.Experimental.Director.AnimatorControllerPlayable).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Int32 layerIndex = ptr_of_this_method->Value;
            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.AnimatorStateInfo stateInfo = (UnityEngine.AnimatorStateInfo) typeof(UnityEngine.AnimatorStateInfo).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
            UnityEngine.Animator animator = (UnityEngine.Animator) typeof(UnityEngine.Animator).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 5);
            UnityEngine.StateMachineBehaviour instance_of_this_method;
            instance_of_this_method = (UnityEngine.StateMachineBehaviour) typeof(UnityEngine.StateMachineBehaviour).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.OnStateIK(animator, stateInfo, layerIndex, controller);

            return(__ret);
        }
        static object PerformMemberwiseClone(ref object o)
        {
            var ins = new UnityEngine.AnimatorStateInfo();

            ins = (UnityEngine.AnimatorStateInfo)o;
            return(ins);
        }
Esempio n. 4
0
 public override void OnStateEnter(UnityEngine.Animator animator, UnityEngine.AnimatorStateInfo stateInfo, int layerIndex)
 {
     if (IsActive)
     {
         UnityEngine.Debug.Break();
     }
 }
Esempio n. 5
0
 public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     if (CallbackOption == AnimatorStateCallbackOption.Exit || (!didExecute && (IsGuaranteedToCallOnExit || NormalizedDelay >= 1)))
     {
         OnExecute(animator, stateInfo, layerIndex);
     }
 }
Esempio n. 6
0
 public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     didExecute = false;
     if (CallbackOption == AnimatorStateCallbackOption.Start || (UpdateZeroCanCallOnStart && NormalizedDelay == 0))
     {
         OnExecute(animator, stateInfo, layerIndex);
     }
 }
Esempio n. 7
0
 public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     if (CallbackOption != AnimatorStateCallbackOption.Update)
     {
         return;
     }
     clampedNormalizedTime = stateInfo.normalizedTime % 1;
     if (!didExecute && clampedNormalizedTime >= NormalizedDelay)
     {
         OnExecute(animator, stateInfo, layerIndex);
     }
 }
        static void WriteBackInstance(CSHotFix.Runtime.Enviorment.AppDomain __domain, StackObject *ptr_of_this_method, IList <object> __mStack, ref UnityEngine.AnimatorStateInfo instance_of_this_method)
        {
            ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
            switch (ptr_of_this_method->ObjectType)
            {
            case ObjectTypes.Object:
            {
                __mStack[ptr_of_this_method->Value] = instance_of_this_method;
            }
            break;

            case ObjectTypes.FieldReference:
            {
                var ___obj = __mStack[ptr_of_this_method->Value];
                if (___obj is ILTypeInstance)
                {
                    ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = instance_of_this_method;
                }
                else
                {
                    var t = __domain.GetType(___obj.GetType()) as CLRType;
                    t.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, instance_of_this_method);
                }
            }
            break;

            case ObjectTypes.StaticFieldReference:
            {
                var t = __domain.GetType(ptr_of_this_method->Value);
                if (t is ILType)
                {
                    ((ILType)t).StaticInstance[ptr_of_this_method->ValueLow] = instance_of_this_method;
                }
                else
                {
                    ((CLRType)t).SetStaticFieldValue(ptr_of_this_method->ValueLow, instance_of_this_method);
                }
            }
            break;

            case ObjectTypes.ArrayReference:
            {
                var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as UnityEngine.AnimatorStateInfo[];
                instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method;
            }
            break;
            }
        }
Esempio n. 9
0
        static StackObject *get_normalizedTime_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
            UnityEngine.AnimatorStateInfo instance_of_this_method = (UnityEngine.AnimatorStateInfo) typeof(UnityEngine.AnimatorStateInfo).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));

            var result_of_this_method = instance_of_this_method.normalizedTime;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method);

            __intp.Free(ptr_of_this_method);
            __ret->ObjectType       = ObjectTypes.Float;
            *(float *)&__ret->Value = result_of_this_method;
            return(__ret + 1);
        }
Esempio n. 10
0
        private void OnExecute(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
        {
            didExecute = true;

            Execute(animator, stateInfo, layerIndex);
        }
Esempio n. 11
0
 protected abstract void Execute(Animator animator, AnimatorStateInfo stateInfo, int layerIndex);