public Entity ReplaceAnimationCurve(UnityEngine.AnimationCurve newAnimationCurve)
        {
            AnimationCurveComponent component;

            if (hasAnimationCurve)
            {
                WillRemoveComponent(ComponentIds.AnimationCurve);
                component = animationCurve;
            }
            else
            {
                component = new AnimationCurveComponent();
            }
            component.animationCurve = newAnimationCurve;
            return(ReplaceComponent(ComponentIds.AnimationCurve, component));
        }
Exemplo n.º 2
0
        static StackObject *GetHashCode_19(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, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.AnimationCurve instance_of_this_method = (UnityEngine.AnimationCurve) typeof(UnityEngine.AnimationCurve).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.GetHashCode();

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method;
            return(__ret + 1);
        }
        int __CSIndexerUnityEngineAnimationCurve(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;

            if (translator.Assignable <UnityEngine.AnimationCurve>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
            {
                UnityEngine.AnimationCurve gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);
                int index = LuaAPI.xlua_tointeger(L, 2);
                LuaAPI.lua_pushboolean(L, true);
                translator.Push(L, gen_to_be_invoked[index]);
                return(2);
            }

            LuaAPI.lua_pushboolean(L, false);
            return(1);
        }
Exemplo n.º 4
0
        static StackObject *get_Item_7(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, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @index = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.AnimationCurve instance_of_this_method = (UnityEngine.AnimationCurve) typeof(UnityEngine.AnimationCurve).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method[index];

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
        int UnityEngineAnimationCurve_m_GetHashCode(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.AnimationCurve gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);


            {
                int gen_ret = gen_to_be_invoked.GetHashCode(  );
                LuaAPI.xlua_pushinteger(L, gen_ret);



                return(1);
            }
        }
        static StackObject *set_customCutoffCurve_3(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, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.AnimationCurve value = (UnityEngine.AnimationCurve) typeof(UnityEngine.AnimationCurve).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.AudioLowPassFilter instance_of_this_method;
            instance_of_this_method = (UnityEngine.AudioLowPassFilter) typeof(UnityEngine.AudioLowPassFilter).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.customCutoffCurve = value;

            return(__ret);
        }
Exemplo n.º 7
0
        static StackObject *set_widthCurve_5(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, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.AnimationCurve value = (UnityEngine.AnimationCurve) typeof(UnityEngine.AnimationCurve).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.LineRenderer instance_of_this_method;
            instance_of_this_method = (UnityEngine.LineRenderer) typeof(UnityEngine.LineRenderer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.widthCurve = value;

            return(__ret);
        }
        int UnityEngineAnimationCurve_m_RemoveKey(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.AnimationCurve gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);


            {
                int _index = LuaAPI.xlua_tointeger(L, 2);

                gen_to_be_invoked.RemoveKey(_index);



                return(0);
            }
        }
Exemplo n.º 9
0
        static StackObject *set_postWrapMode_16(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, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.WrapMode @value = (UnityEngine.WrapMode) typeof(UnityEngine.WrapMode).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.AnimationCurve instance_of_this_method = (UnityEngine.AnimationCurve) typeof(UnityEngine.AnimationCurve).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.postWrapMode = value;

            return(__ret);
        }
        static int _m_AddKey(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.AnimationCurve gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
                {
                    float _time  = (float)LuaAPI.lua_tonumber(L, 2);
                    float _value = (float)LuaAPI.lua_tonumber(L, 3);

                    int gen_ret = gen_to_be_invoked.AddKey(
                        _time,
                        _value);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <UnityEngine.Keyframe>(L, 2))
                {
                    UnityEngine.Keyframe _key; translator.Get(L, 2, out _key);

                    int gen_ret = gen_to_be_invoked.AddKey(
                        _key);
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.AnimationCurve.AddKey!"));
        }
        int UnityEngineAnimationCurve_m_Evaluate(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.AnimationCurve gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);


            {
                float _time = (float)LuaAPI.lua_tonumber(L, 2);

                float gen_ret = gen_to_be_invoked.Evaluate(_time);
                LuaAPI.lua_pushnumber(L, gen_ret);



                return(1);
            }
        }
Exemplo n.º 12
0
        static StackObject *Evaluate_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, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Single @time = *(float *)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.AnimationCurve instance_of_this_method = (UnityEngine.AnimationCurve) typeof(UnityEngine.AnimationCurve).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.Evaluate(@time);

            __ret->ObjectType       = ObjectTypes.Float;
            *(float *)&__ret->Value = result_of_this_method;
            return(__ret + 1);
        }
        int UnityEngineAnimationCurve_m_SmoothTangents(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.AnimationCurve gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);


            {
                int   _index  = LuaAPI.xlua_tointeger(L, 2);
                float _weight = (float)LuaAPI.lua_tonumber(L, 3);

                gen_to_be_invoked.SmoothTangents(_index, _weight);



                return(0);
            }
        }
        int UnityEngineAnimationCurve_m_Constant_xlua_st_(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;



            {
                float _timeStart = (float)LuaAPI.lua_tonumber(L, 1);
                float _timeEnd   = (float)LuaAPI.lua_tonumber(L, 2);
                float _value     = (float)LuaAPI.lua_tonumber(L, 3);

                UnityEngine.AnimationCurve gen_ret = UnityEngine.AnimationCurve.Constant(_timeStart, _timeEnd, _value);
                translator.Push(L, gen_ret);



                return(1);
            }
        }
Exemplo n.º 15
0
        static StackObject *SmoothTangents_9(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, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Single @weight = *(float *)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Int32 @index = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.AnimationCurve instance_of_this_method = (UnityEngine.AnimationCurve) typeof(UnityEngine.AnimationCurve).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.SmoothTangents(@index, @weight);

            return(__ret);
        }
        int UnityEngineAnimationCurve_m_MoveKey(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.AnimationCurve gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);


            {
                int _index = LuaAPI.xlua_tointeger(L, 2);
                UnityEngine.Keyframe _key; translator.Get(L, 3, out _key);

                int gen_ret = gen_to_be_invoked.MoveKey(_index, _key);
                LuaAPI.xlua_pushinteger(L, gen_ret);



                return(1);
            }
        }
        public object Read(object value, ProtoReader source)
        {
            UnityEngine.AnimationCurve data = (UnityEngine.AnimationCurve)
                                                  (value == null ? CreateInstance(source) : value);

            int fieldNumber = 0;

            SubItemToken token = ProtoReader.StartSubItem(source);

            while ((fieldNumber = source.ReadFieldHeader()) != 0)
            {
                switch (fieldNumber)
                {
                case 1:
                    data.preWrapMode = (UnityEngine.WrapMode)source.ReadInt32();
                    break;

                case 2:
                    data.postWrapMode = (UnityEngine.WrapMode)source.ReadInt32();
                    break;

                case 3:
                    keys.Clear();
                    do
                    {
                        keys.Add((UnityEngine.Keyframe) this.keyframeSerializer.Read(
                                     new UnityEngine.Keyframe(), source));
                    } while (source.TryReadFieldHeader(3));
                    data.keys = keys.ToArray();
                    break;

                default:
                    source.SkipField();
                    break;
                }
            }

            ProtoReader.EndSubItem(token, source);

            return(data);
        }
        static int _m_Equals(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.AnimationCurve gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 2 && translator.Assignable <object>(L, 2))
                {
                    object _o = translator.GetObject(L, 2, typeof(object));

                    bool gen_ret = gen_to_be_invoked.Equals(
                        _o);
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 2 && translator.Assignable <UnityEngine.AnimationCurve>(L, 2))
                {
                    UnityEngine.AnimationCurve _other = (UnityEngine.AnimationCurve)translator.GetObject(L, 2, typeof(UnityEngine.AnimationCurve));

                    bool gen_ret = gen_to_be_invoked.Equals(
                        _other);
                    LuaAPI.lua_pushboolean(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.AnimationCurve.Equals!"));
        }
        public void Write(object value, ProtoWriter dest)
        {
            UnityEngine.AnimationCurve data = (UnityEngine.AnimationCurve)value;

            SubItemToken token = ProtoWriter.StartSubItem(value, dest);

            ProtoWriter.WriteFieldHeader(1, WireType.Variant, dest);
            ProtoWriter.WriteInt32((int)data.preWrapMode, dest);

            ProtoWriter.WriteFieldHeader(2, WireType.Variant, dest);
            ProtoWriter.WriteInt32((int)data.postWrapMode, dest);

            for (int i = 0; i < data.keys.Length; ++i)
            {
                ProtoWriter.WriteFieldHeader(3, WireType.String, dest);
                this.keyframeSerializer.Write(data.keys[i], dest);
            }


            ProtoWriter.EndSubItem(token, dest);
        }
        int UnityEngineAnimationClip_m_SetCurve(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.AnimationClip gen_to_be_invoked = (UnityEngine.AnimationClip)translator.FastGetCSObj(L, 1);


            {
                string      _relativePath         = LuaAPI.lua_tostring(L, 2);
                System.Type _type                 = (System.Type)translator.GetObject(L, 3, typeof(System.Type));
                string      _propertyName         = LuaAPI.lua_tostring(L, 4);
                UnityEngine.AnimationCurve _curve = (UnityEngine.AnimationCurve)translator.GetObject(L, 5, typeof(UnityEngine.AnimationCurve));

                gen_to_be_invoked.SetCurve(_relativePath, _type, _propertyName, _curve);



                return(0);
            }
        }
Exemplo n.º 21
0
        public static int __CSIndexer(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

                if (translator.Assignable <UnityEngine.AnimationCurve>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    UnityEngine.AnimationCurve gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);
                    int index = LuaAPI.xlua_tointeger(L, 2);
                    LuaAPI.lua_pushboolean(L, true);
                    translator.Push(L, gen_to_be_invoked[index]);
                    return(2);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            LuaAPI.lua_pushboolean(L, false);
            return(1);
        }
        static int _m_GetHashCode(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.AnimationCurve gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);



                {
                    int gen_ret = gen_to_be_invoked.GetHashCode(  );
                    LuaAPI.xlua_pushinteger(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 23
0
        static int RemoveKey(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.AnimationCurve __cl_gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);


            try {
                {
                    int index = LuaAPI.xlua_tointeger(L, 2);

                    __cl_gen_to_be_invoked.RemoveKey(index);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemplo n.º 24
0
        static StackObject *MoveKey_5(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, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Keyframe @key = (UnityEngine.Keyframe) typeof(UnityEngine.Keyframe).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 @index = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.AnimationCurve instance_of_this_method = (UnityEngine.AnimationCurve) typeof(UnityEngine.AnimationCurve).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.MoveKey(@index, @key);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method;
            return(__ret + 1);
        }
        static int _m_Constant_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    float _timeStart = (float)LuaAPI.lua_tonumber(L, 1);
                    float _timeEnd   = (float)LuaAPI.lua_tonumber(L, 2);
                    float _value     = (float)LuaAPI.lua_tonumber(L, 3);

                    UnityEngine.AnimationCurve gen_ret = UnityEngine.AnimationCurve.Constant(_timeStart, _timeEnd, _value);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }
Exemplo n.º 26
0
        static int SmoothTangents(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.AnimationCurve __cl_gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);


            try {
                {
                    int   index  = LuaAPI.xlua_tointeger(L, 2);
                    float weight = (float)LuaAPI.lua_tonumber(L, 3);

                    __cl_gen_to_be_invoked.SmoothTangents(index, weight);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemplo n.º 27
0
        static int Evaluate(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.AnimationCurve __cl_gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);


            try {
                {
                    float time = (float)LuaAPI.lua_tonumber(L, 2);

                    float __cl_gen_ret = __cl_gen_to_be_invoked.Evaluate(time);
                    LuaAPI.lua_pushnumber(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static int _m_EaseInOut_xlua_st_(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                {
                    float timeStart  = (float)LuaAPI.lua_tonumber(L, 1);
                    float valueStart = (float)LuaAPI.lua_tonumber(L, 2);
                    float timeEnd    = (float)LuaAPI.lua_tonumber(L, 3);
                    float valueEnd   = (float)LuaAPI.lua_tonumber(L, 4);

                    UnityEngine.AnimationCurve __cl_gen_ret = UnityEngine.AnimationCurve.EaseInOut(timeStart, valueStart, timeEnd, valueEnd);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemplo n.º 29
0
        static int MoveKey(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.AnimationCurve __cl_gen_to_be_invoked = (UnityEngine.AnimationCurve)translator.FastGetCSObj(L, 1);


            try {
                {
                    int index = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.Keyframe key; translator.Get(L, 3, out key);

                    int __cl_gen_ret = __cl_gen_to_be_invoked.MoveKey(index, key);
                    LuaAPI.xlua_pushinteger(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        int __CreateInstanceUnityEngineAnimationCurve(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;

            if (gen_param_count >= 1 && (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 2) || translator.Assignable <UnityEngine.Keyframe>(L, 2)))
            {
                UnityEngine.Keyframe[] _keys = translator.GetParams <UnityEngine.Keyframe>(L, 2);

                UnityEngine.AnimationCurve gen_ret = new UnityEngine.AnimationCurve(_keys);
                translator.Push(L, gen_ret);

                return(1);
            }
            if (gen_param_count == 1)
            {
                UnityEngine.AnimationCurve gen_ret = new UnityEngine.AnimationCurve();
                translator.Push(L, gen_ret);

                return(1);
            }


            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.AnimationCurve constructor!"));
        }
Exemplo n.º 31
0
		protected virtual float RandomCurveTime(ref AnimationCurve curve)
		{
			return Random.Range(CurveMinTime(ref curve), CurveMaxTime(ref curve));
		}
Exemplo n.º 32
0
		protected virtual float CurveMinTime(ref AnimationCurve curve)
		{
			return curve.keys[0].time;
		}
Exemplo n.º 33
0
		protected virtual float CurveMaxTime(ref AnimationCurve curve)
		{
			return curve.keys[curve.keys.Length - 1].time;
		}