diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua index c182e45ee2..a40458e0b6 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginManager.lua @@ -21,7 +21,7 @@ function this.Initialize() this.CurAccount=PlayerPrefs.GetString(this.GameName.."Account",'') this.CurSession=PlayerPrefs.GetString(this.GameName.."Session",'') - SDKMgr.onRegisterCallback = function(loginResp) + SDKMgr.onRegisterCallback = function() -- Game.GlobalEvent:DispatchEvent(GameEvent.LoginSuccess.OnLoginSuccess,loginResp) ThinkingAnalyticsManager.Track("create_account") end diff --git a/Assets/Source/Generate/DelegateFactory.cs b/Assets/Source/Generate/DelegateFactory.cs index 77c0fbd78e..302ac4d67d 100644 --- a/Assets/Source/Generate/DelegateFactory.cs +++ b/Assets/Source/Generate/DelegateFactory.cs @@ -81,6 +81,7 @@ public class DelegateFactory dict.Add(typeof(System.Action), factory.System_Action_string); dict.Add(typeof(UnityEngine.Events.UnityAction), factory.UnityEngine_Events_UnityAction_string_UnityEngine_Object); dict.Add(typeof(SDK.SDKManager.InitLaunchAction), factory.SDK_SDKManager_InitLaunchAction); + dict.Add(typeof(SDK.SDKManager.RegisterAction), factory.SDK_SDKManager_RegisterAction); dict.Add(typeof(SDK.SDKManager.LoginAction), factory.SDK_SDKManager_LoginAction); dict.Add(typeof(SDK.SDKManager.PayAction), factory.SDK_SDKManager_PayAction); dict.Add(typeof(SDK.SDKManager.SwitchAccountAction), factory.SDK_SDKManager_SwitchAccountAction); @@ -162,6 +163,7 @@ public class DelegateFactory DelegateTraits>.Init(factory.System_Action_string); DelegateTraits>.Init(factory.UnityEngine_Events_UnityAction_string_UnityEngine_Object); DelegateTraits.Init(factory.SDK_SDKManager_InitLaunchAction); + DelegateTraits.Init(factory.SDK_SDKManager_RegisterAction); DelegateTraits.Init(factory.SDK_SDKManager_LoginAction); DelegateTraits.Init(factory.SDK_SDKManager_PayAction); DelegateTraits.Init(factory.SDK_SDKManager_SwitchAccountAction); @@ -243,6 +245,7 @@ public class DelegateFactory TypeTraits>.Init(factory.Check_System_Action_string); TypeTraits>.Init(factory.Check_UnityEngine_Events_UnityAction_string_UnityEngine_Object); TypeTraits.Init(factory.Check_SDK_SDKManager_InitLaunchAction); + TypeTraits.Init(factory.Check_SDK_SDKManager_RegisterAction); TypeTraits.Init(factory.Check_SDK_SDKManager_LoginAction); TypeTraits.Init(factory.Check_SDK_SDKManager_PayAction); TypeTraits.Init(factory.Check_SDK_SDKManager_SwitchAccountAction); @@ -324,6 +327,7 @@ public class DelegateFactory StackTraits>.Push = factory.Push_System_Action_string; StackTraits>.Push = factory.Push_UnityEngine_Events_UnityAction_string_UnityEngine_Object; StackTraits.Push = factory.Push_SDK_SDKManager_InitLaunchAction; + StackTraits.Push = factory.Push_SDK_SDKManager_RegisterAction; StackTraits.Push = factory.Push_SDK_SDKManager_LoginAction; StackTraits.Push = factory.Push_SDK_SDKManager_PayAction; StackTraits.Push = factory.Push_SDK_SDKManager_SwitchAccountAction; @@ -4157,6 +4161,63 @@ public class DelegateFactory ToLua.Push(L, o); } + class SDK_SDKManager_RegisterAction_Event : LuaDelegate + { + public SDK_SDKManager_RegisterAction_Event(LuaFunction func) : base(func) { } + public SDK_SDKManager_RegisterAction_Event(LuaFunction func, LuaTable self) : base(func, self) { } + + public void Call(string param0) + { + func.BeginPCall(); + func.Push(param0); + func.PCall(); + func.EndPCall(); + } + + public void CallWithSelf(string param0) + { + func.BeginPCall(); + func.Push(self); + func.Push(param0); + func.PCall(); + func.EndPCall(); + } + } + + public SDK.SDKManager.RegisterAction SDK_SDKManager_RegisterAction(LuaFunction func, LuaTable self, bool flag) + { + if (func == null) + { + SDK.SDKManager.RegisterAction fn = delegate(string param0) { }; + return fn; + } + + if(!flag) + { + SDK_SDKManager_RegisterAction_Event target = new SDK_SDKManager_RegisterAction_Event(func); + SDK.SDKManager.RegisterAction d = target.Call; + target.method = d.Method; + return d; + } + else + { + SDK_SDKManager_RegisterAction_Event target = new SDK_SDKManager_RegisterAction_Event(func, self); + SDK.SDKManager.RegisterAction d = target.CallWithSelf; + target.method = d.Method; + return d; + } + } + + bool Check_SDK_SDKManager_RegisterAction(IntPtr L, int pos) + { + return TypeChecker.CheckDelegateType(typeof(SDK.SDKManager.RegisterAction), L, pos); + } + + void Push_SDK_SDKManager_RegisterAction(IntPtr L, SDK.SDKManager.RegisterAction o) + { + ToLua.Push(L, o); + } + class SDK_SDKManager_LoginAction_Event : LuaDelegate { public SDK_SDKManager_LoginAction_Event(LuaFunction func) : base(func) { }