#if USE_UNI_LUA
|
using LuaAPI = UniLua.Lua;
|
using RealStatePtr = UniLua.ILuaState;
|
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
#else
|
using LuaAPI = XLua.LuaDLL.Lua;
|
using RealStatePtr = System.IntPtr;
|
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
#endif
|
|
using XLua;
|
using System.Collections.Generic;
|
|
|
namespace XLua.CSObjectWrap
|
{
|
using Utils = XLua.Utils;
|
public class PutawayDataWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(PutawayData);
|
Utils.BeginObjectRegister(type, L, translator, 0, 1, 5, 5);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "priceType", _g_get_priceType);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "priceCnt", _g_get_priceCnt);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "pwd", _g_get_pwd);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "itemCnt", _g_get_itemCnt);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "itemModel", _g_get_itemModel);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "priceType", _s_set_priceType);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "priceCnt", _s_set_priceCnt);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "pwd", _s_set_pwd);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "itemCnt", _s_set_itemCnt);
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "itemModel", _s_set_itemModel);
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
null, null, null);
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
|
|
|
|
|
Utils.EndClassRegister(type, L, translator);
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int __CreateInstance(RealStatePtr L)
|
{
|
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
if(LuaAPI.lua_gettop(L) == 1)
|
{
|
|
PutawayData gen_ret = new PutawayData();
|
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 PutawayData constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Init(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
PutawayData gen_to_be_invoked = (PutawayData)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.Init( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_priceType(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
PutawayData gen_to_be_invoked = (PutawayData)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.priceType);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_priceCnt(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
PutawayData gen_to_be_invoked = (PutawayData)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushuint(L, gen_to_be_invoked.priceCnt);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_pwd(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
PutawayData gen_to_be_invoked = (PutawayData)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.pwd);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_itemCnt(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
PutawayData gen_to_be_invoked = (PutawayData)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.itemCnt);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_itemModel(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
PutawayData gen_to_be_invoked = (PutawayData)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.itemModel);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_priceType(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
PutawayData gen_to_be_invoked = (PutawayData)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.priceType = (byte)LuaAPI.xlua_tointeger(L, 2);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_priceCnt(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
PutawayData gen_to_be_invoked = (PutawayData)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.priceCnt = LuaAPI.xlua_touint(L, 2);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_pwd(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
PutawayData gen_to_be_invoked = (PutawayData)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.pwd = LuaAPI.lua_tostring(L, 2);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_itemCnt(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
PutawayData gen_to_be_invoked = (PutawayData)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.itemCnt = (ushort)LuaAPI.xlua_tointeger(L, 2);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_itemModel(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
PutawayData gen_to_be_invoked = (PutawayData)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.itemModel = (Snxxz.UI.ItemModel)translator.GetObject(L, 2, typeof(Snxxz.UI.ItemModel));
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
|
|
|
|
}
|
}
|