#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 SnxxzUIItemBehaviourWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(Snxxz.UI.ItemBehaviour);
|
Utils.BeginObjectRegister(type, L, translator, 0, 3, 11, 1);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetItem", _m_SetItem);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetCount", _m_SetCount);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "DisplayEmpty", _m_DisplayEmpty);
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "icon", _g_get_icon);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "backGround", _g_get_backGround);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "countContainer", _g_get_countContainer);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "count", _g_get_count);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "bind", _g_get_bind);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "stars", _g_get_stars);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "showCount", _g_get_showCount);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "itemId", _g_get_itemId);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "itemCount", _g_get_itemCount);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "itemBind", _g_get_itemBind);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "itemQuality", _g_get_itemQuality);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "showCount", _s_set_showCount);
|
|
|
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)
|
{
|
|
Snxxz.UI.ItemBehaviour gen_ret = new Snxxz.UI.ItemBehaviour();
|
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 Snxxz.UI.ItemBehaviour constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_SetItem(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 5&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5))
|
{
|
int __id = LuaAPI.xlua_tointeger(L, 2);
|
int __count = LuaAPI.xlua_tointeger(L, 3);
|
bool __bind = LuaAPI.lua_toboolean(L, 4);
|
int __quality = LuaAPI.xlua_tointeger(L, 5);
|
|
gen_to_be_invoked.SetItem( __id, __count, __bind, __quality );
|
|
|
|
return 0;
|
}
|
if(gen_param_count == 4&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4))
|
{
|
int __id = LuaAPI.xlua_tointeger(L, 2);
|
int __count = LuaAPI.xlua_tointeger(L, 3);
|
bool __bind = LuaAPI.lua_toboolean(L, 4);
|
|
gen_to_be_invoked.SetItem( __id, __count, __bind );
|
|
|
|
return 0;
|
}
|
if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
|
{
|
int __id = LuaAPI.xlua_tointeger(L, 2);
|
int __count = LuaAPI.xlua_tointeger(L, 3);
|
|
gen_to_be_invoked.SetItem( __id, __count );
|
|
|
|
return 0;
|
}
|
if(gen_param_count == 2&& translator.Assignable<Snxxz.UI.Item>(L, 2))
|
{
|
Snxxz.UI.Item __item;translator.Get(L, 2, out __item);
|
|
gen_to_be_invoked.SetItem( __item );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.ItemBehaviour.SetItem!");
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_SetCount(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int __count = LuaAPI.xlua_tointeger(L, 2);
|
|
gen_to_be_invoked.SetCount( __count );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_DisplayEmpty(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.DisplayEmpty( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_icon(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.icon);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_backGround(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.backGround);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_countContainer(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.countContainer);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_count(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.count);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_bind(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.bind);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_stars(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.stars);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_showCount(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.showCount);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_itemId(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.itemId);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_itemCount(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.itemCount);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_itemBind(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.itemBind);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_itemQuality(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.itemQuality);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_showCount(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.ItemBehaviour gen_to_be_invoked = (Snxxz.UI.ItemBehaviour)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.showCount = LuaAPI.lua_toboolean(L, 2);
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
|
|
|
|
}
|
}
|