protected override object ReadObject <T>(ES3Reader reader) { var instance = new UnityEngine.PhysicsMaterial2D(); ReadObject <T>(reader, instance); return(instance); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 1) { UnityEngine.PhysicsMaterial2D gen_ret = new UnityEngine.PhysicsMaterial2D(); translator.Push(L, gen_ret); return(1); } if (LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _name = LuaAPI.lua_tostring(L, 2); UnityEngine.PhysicsMaterial2D gen_ret = new UnityEngine.PhysicsMaterial2D(_name); translator.Push(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.PhysicsMaterial2D constructor!")); }
static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *__ret = ILIntepreter.Minus(__esp, 0); var result_of_this_method = new UnityEngine.PhysicsMaterial2D(); return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }
public override void ReadFrom(object obj) { base.ReadFrom(obj); if (obj == null) { return; } UnityEngine.PhysicsMaterial2D o = (UnityEngine.PhysicsMaterial2D)obj; bounciness = o.bounciness; friction = o.friction; }
static int _g_get_friction(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PhysicsMaterial2D gen_to_be_invoked = (UnityEngine.PhysicsMaterial2D)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.friction); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(1); }
static int _s_set_bounciness(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.PhysicsMaterial2D gen_to_be_invoked = (UnityEngine.PhysicsMaterial2D)translator.FastGetCSObj(L, 1); gen_to_be_invoked.bounciness = (float)LuaAPI.lua_tonumber(L, 2); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(0); }
static int _g_get_bounciness(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { UnityEngine.PhysicsMaterial2D __cl_gen_to_be_invoked = (UnityEngine.PhysicsMaterial2D)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, __cl_gen_to_be_invoked.bounciness); } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(1); }
static int _s_set_friction(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { UnityEngine.PhysicsMaterial2D __cl_gen_to_be_invoked = (UnityEngine.PhysicsMaterial2D)translator.FastGetCSObj(L, 1); __cl_gen_to_be_invoked.friction = (float)LuaAPI.lua_tonumber(L, 2); } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(0); }
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.PhysicsMaterial2D o = (UnityEngine.PhysicsMaterial2D)obj; o.bounciness = bounciness; o.friction = friction; return(o); }
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, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.String name = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = new UnityEngine.PhysicsMaterial2D(name); return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }