static int __CreateInstance(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { if (LuaAPI.lua_gettop(L) == 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); UnityEngine.Keyframe __cl_gen_ret = new UnityEngine.Keyframe(time, value); translator.Push(L, __cl_gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 5 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5)) { float time = (float)LuaAPI.lua_tonumber(L, 2); float value = (float)LuaAPI.lua_tonumber(L, 3); float inTangent = (float)LuaAPI.lua_tonumber(L, 4); float outTangent = (float)LuaAPI.lua_tonumber(L, 5); UnityEngine.Keyframe __cl_gen_ret = new UnityEngine.Keyframe(time, value, inTangent, outTangent); translator.Push(L, __cl_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.Keyframe constructor!")); }
static StackObject *Ctor_1(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, 4); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Single outTangent = *(float *)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Single inTangent = *(float *)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.Single value = *(float *)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 4); System.Single time = *(float *)&ptr_of_this_method->Value; var result_of_this_method = new UnityEngine.Keyframe(time, value, inTangent, outTangent); if (!isNewObj) { __ret--; WriteBackInstance(__domain, __ret, __mStack, ref result_of_this_method); return(__ret); } return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }
static object PerformMemberwiseClone(ref object o) { var ins = new UnityEngine.Keyframe(); ins = (UnityEngine.Keyframe)o; return(ins); }
static (float, KeyframeData) KeyframeConversion(UnityEngine.Keyframe inKey) { var key = new KeyframeData { InTangent = inKey.inTangent, OutTangent = inKey.outTangent, Value = inKey.value, }; return(inKey.time, key); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 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); var gen_ret = new UnityEngine.Keyframe(_time, _value); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 5 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5)) { float _time = (float)LuaAPI.lua_tonumber(L, 2); float _value = (float)LuaAPI.lua_tonumber(L, 3); float _inTangent = (float)LuaAPI.lua_tonumber(L, 4); float _outTangent = (float)LuaAPI.lua_tonumber(L, 5); var gen_ret = new UnityEngine.Keyframe(_time, _value, _inTangent, _outTangent); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 7 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 6) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 7)) { float _time = (float)LuaAPI.lua_tonumber(L, 2); float _value = (float)LuaAPI.lua_tonumber(L, 3); float _inTangent = (float)LuaAPI.lua_tonumber(L, 4); float _outTangent = (float)LuaAPI.lua_tonumber(L, 5); float _inWeight = (float)LuaAPI.lua_tonumber(L, 6); float _outWeight = (float)LuaAPI.lua_tonumber(L, 7); var gen_ret = new UnityEngine.Keyframe(_time, _value, _inTangent, _outTangent, _inWeight, _outWeight); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 1) { translator.Push(L, default(UnityEngine.Keyframe)); 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.Keyframe constructor!")); }
public override void ReadFrom(object obj) { base.ReadFrom(obj); if (obj == null) { return; } UnityEngine.Keyframe o = (UnityEngine.Keyframe)obj; time = o.time; value = o.value; inTangent = o.inTangent; outTangent = o.outTangent; //tangentMode = o.tangentMode; }
int __CreateInstanceUnityEngineKeyframe(RealStatePtr L, int gen_param_count) { ObjectTranslator translator = this; 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); UnityEngine.Keyframe gen_ret = new UnityEngine.Keyframe(_time, _value); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 5 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5)) { float _time = (float)LuaAPI.lua_tonumber(L, 2); float _value = (float)LuaAPI.lua_tonumber(L, 3); float _inTangent = (float)LuaAPI.lua_tonumber(L, 4); float _outTangent = (float)LuaAPI.lua_tonumber(L, 5); UnityEngine.Keyframe gen_ret = new UnityEngine.Keyframe(_time, _value, _inTangent, _outTangent); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 7 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 6) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 7)) { float _time = (float)LuaAPI.lua_tonumber(L, 2); float _value = (float)LuaAPI.lua_tonumber(L, 3); float _inTangent = (float)LuaAPI.lua_tonumber(L, 4); float _outTangent = (float)LuaAPI.lua_tonumber(L, 5); float _inWeight = (float)LuaAPI.lua_tonumber(L, 6); float _outWeight = (float)LuaAPI.lua_tonumber(L, 7); UnityEngine.Keyframe gen_ret = new UnityEngine.Keyframe(_time, _value, _inTangent, _outTangent, _inWeight, _outWeight); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 1) { translator.Push(L, default(UnityEngine.Keyframe)); return(1); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Keyframe constructor!")); }
public override object WriteTo(object obj, System.Collections.Generic.Dictionary <long, UnityEngine.Object> objects) { obj = base.WriteTo(obj, objects); if (obj == null) { return(null); } UnityEngine.Keyframe o = (UnityEngine.Keyframe)obj; o.time = time; o.value = value; o.inTangent = inTangent; o.outTangent = outTangent; //o.tangentMode = tangentMode; return(o); }
public System.Int32 MoveKey(System.Int32 index, UnityEngine.Keyframe key) { //Mock Data: if (m_functionCallCounts == null) { m_functionCallCounts = new Dictionary <string, int>(); } if (!m_functionCallCounts.ContainsKey("Int32 MoveKey(Int32, Keyframe)")) { m_functionCallCounts.Add("Int32 MoveKey(Int32, Keyframe)", 0); } m_functionCallCounts["Int32 MoveKey(Int32, Keyframe)"]++; throw new NotImplementedException("This function was automatically generated by Mockery and has no real implementation yet."); }
static void WriteBackInstance(CSHotFix.Runtime.Enviorment.AppDomain __domain, StackObject *ptr_of_this_method, IList <object> __mStack, ref UnityEngine.Keyframe 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.Keyframe[]; instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method; } break; } }
public static UnityEngine.AnimationCurve ToCurve(ProbabilityDistributions distribution, int definition) { var keys = new UnityEngine.Keyframe[definition]; for (int i = 0; i < keys.Length; i++) { keys[i] = new UnityEngine.Keyframe((float)i / keys.Length, 0f); } for (int i = 0; i < keys.Length * 100; i++) { int index = (int)Math.Floor((Range(1d, 10d, distribution) - 1d) / 9d * keys.Length); keys[index].value += 1f / definition; } return(new UnityEngine.AnimationCurve(keys)); }
static StackObject *get_weightedMode_12(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); ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); UnityEngine.Keyframe instance_of_this_method = (UnityEngine.Keyframe) typeof(UnityEngine.Keyframe).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); var result_of_this_method = instance_of_this_method.weightedMode; 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); return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }
public object Read(object value, ProtoReader source) { UnityEngine.Keyframe data = (UnityEngine.Keyframe)value; int fieldNumber = 0; SubItemToken token = ProtoReader.StartSubItem(source); while ((fieldNumber = source.ReadFieldHeader()) != 0) { switch (fieldNumber) { case 1: data.time = source.ReadSingle(); break; case 2: data.value = source.ReadSingle(); break; case 3: data.inTangent = source.ReadSingle(); break; case 4: data.outTangent = source.ReadSingle(); break; case 5: data.tangentMode = source.ReadInt32(); break; default: source.SkipField(); break; } } ProtoReader.EndSubItem(token, source); return(data); }
static StackObject *AddKey_4(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.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); UnityEngine.AnimationCurve instance_of_this_method; 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.AddKey(key); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method; return(__ret + 1); }
static StackObject *get_outWeight_10(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); ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); UnityEngine.Keyframe instance_of_this_method = (UnityEngine.Keyframe) typeof(UnityEngine.Keyframe).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); var result_of_this_method = instance_of_this_method.outWeight; 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); }
static StackObject *set_inTangent_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 @value = *(float *)&ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method); UnityEngine.Keyframe instance_of_this_method = (UnityEngine.Keyframe) typeof(UnityEngine.Keyframe).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); instance_of_this_method.inTangent = value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); WriteBackInstance(__domain, ptr_of_this_method, __mStack, ref instance_of_this_method); __intp.Free(ptr_of_this_method); return(__ret); }
public void Write(object value, ProtoWriter dest) { UnityEngine.Keyframe data = (UnityEngine.Keyframe)value; SubItemToken token = ProtoWriter.StartSubItem(value, dest); ProtoWriter.WriteFieldHeader(1, WireType.Fixed32, dest); ProtoWriter.WriteSingle(data.time, dest); ProtoWriter.WriteFieldHeader(2, WireType.Fixed32, dest); ProtoWriter.WriteSingle(data.value, dest); ProtoWriter.WriteFieldHeader(3, WireType.Fixed32, dest); ProtoWriter.WriteSingle(data.inTangent, dest); ProtoWriter.WriteFieldHeader(4, WireType.Fixed32, dest); ProtoWriter.WriteSingle(data.outTangent, dest); ProtoWriter.WriteFieldHeader(5, WireType.Variant, dest); ProtoWriter.WriteInt32(data.tangentMode, dest); ProtoWriter.EndSubItem(token, dest); }