763 lines
24 KiB
C#
763 lines
24 KiB
C#
#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 SdkControlWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(SdkControl);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 21, 3, 0);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetDefaultServer", _m_GetDefaultServer);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsSdkLogin", _m_IsSdkLogin);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "LoginPhpComplete", _m_LoginPhpComplete);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "NoticeComplete", _m_NoticeComplete);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Logout", _m_Logout);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SwitchAccount", _m_SwitchAccount);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetNotice", _m_GetNotice);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RedemptionCode", _m_RedemptionCode);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ShakeDevice", _m_ShakeDevice);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "LoginPhp", _m_LoginPhp);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetServerList", _m_GetServerList);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PostServerList", _m_PostServerList);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SubmitLoadData", _m_SubmitLoadData);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SubmitData", _m_SubmitData);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "LoginSdk", _m_LoginSdk);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CloseGame", _m_CloseGame);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Payment", _m_Payment);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "StartCloseGame", _m_StartCloseGame);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "LoginComplete", _m_LoginComplete);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "LogoutComplete", _m_LogoutComplete);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PaymentComplete", _m_PaymentComplete);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "currentServerData", _g_get_currentServerData);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "TableVariant", _g_get_TableVariant);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "useGm", _g_get_useGm);
|
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 2, 0);
|
|
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "instance", _g_get_instance);
|
|
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "appQuit", _g_get_appQuit);
|
|
|
|
|
|
|
|
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)
|
|
{
|
|
|
|
var gen_ret = new SdkControl();
|
|
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 SdkControl constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetDefaultServer(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.GetDefaultServer( );
|
|
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_IsSdkLogin(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
var gen_ret = gen_to_be_invoked.IsSdkLogin( );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_LoginPhpComplete(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _ip = LuaAPI.lua_tostring(L, 2);
|
|
int _port = LuaAPI.xlua_tointeger(L, 3);
|
|
|
|
gen_to_be_invoked.LoginPhpComplete( _ip, _port );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_NoticeComplete(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _title = LuaAPI.lua_tostring(L, 2);
|
|
string _description = LuaAPI.lua_tostring(L, 3);
|
|
bool _willOpen = LuaAPI.lua_toboolean(L, 4);
|
|
|
|
gen_to_be_invoked.NoticeComplete( _title, _description, _willOpen );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Logout(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.Logout( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SwitchAccount(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.SwitchAccount( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetNotice(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
bool _alwaysOpen = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
gen_to_be_invoked.GetNotice( _alwaysOpen );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RedemptionCode(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _code = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.RedemptionCode( _code );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ShakeDevice(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.ShakeDevice( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_LoginPhp(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
LoginData.ServerListData _serverData = (LoginData.ServerListData)translator.GetObject(L, 2, typeof(LoginData.ServerListData));
|
|
|
|
gen_to_be_invoked.LoginPhp( _serverData );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetServerList(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.GetServerList( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_PostServerList(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
System.Collections.Generic.List<LoginData.ServerPageData> _serverList = (System.Collections.Generic.List<LoginData.ServerPageData>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<LoginData.ServerPageData>));
|
|
|
|
gen_to_be_invoked.PostServerList( _serverList );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SubmitLoadData(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
LoadDataType _action;translator.Get(L, 2, out _action);
|
|
|
|
gen_to_be_invoked.SubmitLoadData( _action );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SubmitData(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
RoleDataSubmit _submitType;translator.Get(L, 2, out _submitType);
|
|
|
|
gen_to_be_invoked.SubmitData( _submitType );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_LoginSdk(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
bool _isAuto = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
gen_to_be_invoked.LoginSdk( _isAuto );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_CloseGame(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.CloseGame( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Payment(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _goodsId = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
gen_to_be_invoked.Payment( _goodsId );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_StartCloseGame(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _args = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.StartCloseGame( _args );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_LoginComplete(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _args = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.LoginComplete( _args );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_LogoutComplete(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _args = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.LogoutComplete( _args );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_PaymentComplete(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
string _args = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.PaymentComplete( _args );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_currentServerData(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.currentServerData);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_TableVariant(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.TableVariant);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_useGm(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
SdkControl gen_to_be_invoked = (SdkControl)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.useGm);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_instance(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
translator.Push(L, SdkControl.instance);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_appQuit(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
LuaAPI.lua_pushboolean(L, SdkControl.appQuit);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|