292 lines
11 KiB
C#
292 lines
11 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 UnityEngineSignInWithAppleSignInWithAppleWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(UnityEngine.SignInWithApple.SignInWithApple);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 3, 3, 3);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetCredentialState", _m_GetCredentialState);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Login", _m_Login);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Update", _m_Update);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "onLogin", _g_get_onLogin);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "onCredentialState", _g_get_onCredentialState);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "onError", _g_get_onError);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "onLogin", _s_set_onLogin);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "onCredentialState", _s_set_onCredentialState);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "onError", _s_set_onError);
|
|
|
|
|
|
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)
|
|
{
|
|
|
|
var gen_ret = new UnityEngine.SignInWithApple.SignInWithApple();
|
|
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.SignInWithApple.SignInWithApple constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetCredentialState(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.SignInWithApple.SignInWithApple gen_to_be_invoked = (UnityEngine.SignInWithApple.SignInWithApple)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))
|
|
{
|
|
string _userID = LuaAPI.lua_tostring(L, 2);
|
|
|
|
gen_to_be_invoked.GetCredentialState( _userID );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& translator.Assignable<UnityEngine.SignInWithApple.SignInWithApple.Callback>(L, 3))
|
|
{
|
|
string _userID = LuaAPI.lua_tostring(L, 2);
|
|
UnityEngine.SignInWithApple.SignInWithApple.Callback _callback = translator.GetDelegate<UnityEngine.SignInWithApple.SignInWithApple.Callback>(L, 3);
|
|
|
|
gen_to_be_invoked.GetCredentialState( _userID, _callback );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.SignInWithApple.SignInWithApple.GetCredentialState!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Login(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.SignInWithApple.SignInWithApple gen_to_be_invoked = (UnityEngine.SignInWithApple.SignInWithApple)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 1)
|
|
{
|
|
|
|
gen_to_be_invoked.Login( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
if(gen_param_count == 2&& translator.Assignable<UnityEngine.SignInWithApple.SignInWithApple.Callback>(L, 2))
|
|
{
|
|
UnityEngine.SignInWithApple.SignInWithApple.Callback _callback = translator.GetDelegate<UnityEngine.SignInWithApple.SignInWithApple.Callback>(L, 2);
|
|
|
|
gen_to_be_invoked.Login( _callback );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.SignInWithApple.SignInWithApple.Login!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Update(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.SignInWithApple.SignInWithApple gen_to_be_invoked = (UnityEngine.SignInWithApple.SignInWithApple)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.Update( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_onLogin(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.SignInWithApple.SignInWithApple gen_to_be_invoked = (UnityEngine.SignInWithApple.SignInWithApple)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.onLogin);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_onCredentialState(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.SignInWithApple.SignInWithApple gen_to_be_invoked = (UnityEngine.SignInWithApple.SignInWithApple)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.onCredentialState);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_onError(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.SignInWithApple.SignInWithApple gen_to_be_invoked = (UnityEngine.SignInWithApple.SignInWithApple)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.onError);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_onLogin(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.SignInWithApple.SignInWithApple gen_to_be_invoked = (UnityEngine.SignInWithApple.SignInWithApple)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.onLogin = (UnityEngine.SignInWithApple.SignInWithAppleEvent)translator.GetObject(L, 2, typeof(UnityEngine.SignInWithApple.SignInWithAppleEvent));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_onCredentialState(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.SignInWithApple.SignInWithApple gen_to_be_invoked = (UnityEngine.SignInWithApple.SignInWithApple)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.onCredentialState = (UnityEngine.SignInWithApple.SignInWithAppleEvent)translator.GetObject(L, 2, typeof(UnityEngine.SignInWithApple.SignInWithAppleEvent));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_onError(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.SignInWithApple.SignInWithApple gen_to_be_invoked = (UnityEngine.SignInWithApple.SignInWithApple)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.onError = (UnityEngine.SignInWithApple.SignInWithAppleEvent)translator.GetObject(L, 2, typeof(UnityEngine.SignInWithApple.SignInWithAppleEvent));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|