【热更配置】应用到lua层
parent
1dafda4b44
commit
ab0a82f981
|
@ -21,6 +21,7 @@ RRenderMgr = App.RRenderMgr
|
|||
--shareSDKMgr = App.ShareSDKMgr
|
||||
SDKMgr = App.SDKMgr
|
||||
VersionManager=App.VersionMgr
|
||||
ConfigMgr=App.ConfigMgr
|
||||
--umengsdk=App.UmengSdkMgr
|
||||
imageDownloadMgr = App.ImageDownloadMgr
|
||||
--BuglySdkManager=App.BuglySdkMgr
|
||||
|
|
|
@ -8,6 +8,7 @@ require "Framework/Manager/PoolManager"
|
|||
require "Framework/Manager/SoundManager"
|
||||
require "Framework/Manager/CardRendererManager"
|
||||
require "Framework/Manager/RoleRenderManager"
|
||||
require "Framework/Manager/ServerConfigManager"
|
||||
require "Data/UIData"
|
||||
require "Data/SoundData"
|
||||
require "Data/ConfigData"
|
||||
|
@ -89,6 +90,7 @@ function Framework.Initialize()
|
|||
UIManager.Initialize()
|
||||
poolManager = PoolManager:new()
|
||||
CardRendererManager.Initialize()
|
||||
ServerConfigManager.Initialize()
|
||||
|
||||
UpdateBeat:Add(update, Framework)
|
||||
end
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
ServerConfigManager = { }
|
||||
|
||||
|
||||
function ServerConfigManager.Initialize()
|
||||
|
||||
end
|
||||
|
||||
-- 判断是否有
|
||||
function ServerConfigManager.IsConfig()
|
||||
if AndroidDeviceInfo.Instance:GetVersionCode() > 24 then
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
function ServerConfigManager.GetConfigInfo(key)
|
||||
local s = ConfigMgr:GetConfigInfo(key)
|
||||
return s
|
||||
end
|
||||
function ServerConfigManager.GetConfigNetInfo(key)
|
||||
local s = ConfigMgr:GetConfigNetInfo(key)
|
||||
return s
|
||||
|
||||
end
|
||||
function ServerConfigManager.GetConfigPersistentInfo(key)
|
||||
local s = ConfigMgr:GetConfigPersistentInfo(key)
|
||||
return s
|
||||
|
||||
end
|
||||
function ServerConfigManager.GetConfigStreamingInfo(key)
|
||||
local s = ConfigMgr:GetConfigStreamingInfo(key)
|
||||
return s
|
||||
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 587696ae067d4004ba3b5b8c40e674e9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -247,6 +247,7 @@ public static class CustomSettings
|
|||
_GT(typeof(ResourcesUpdateState)),
|
||||
_GT(typeof(ImageDownloadManager)),
|
||||
_GT(typeof(VersionManager)),
|
||||
_GT(typeof(ConfigManager)),
|
||||
_GT(typeof(UpdateManager)),
|
||||
_GT(typeof(SetInternetPic)),
|
||||
_GT(typeof(SkeletonGraphic)),
|
||||
|
|
|
@ -29,6 +29,7 @@ public class AppWrap
|
|||
L.RegVar("SDKMgr", get_SDKMgr, null);
|
||||
L.RegVar("RRenderMgr", get_RRenderMgr, null);
|
||||
L.RegVar("VersionMgr", get_VersionMgr, null);
|
||||
L.RegVar("ConfigMgr", get_ConfigMgr, null);
|
||||
L.EndClass();
|
||||
}
|
||||
|
||||
|
@ -341,5 +342,19 @@ public class AppWrap
|
|||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int get_ConfigMgr(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
ToLua.PushObject(L, App.ConfigMgr);
|
||||
return 1;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
//this source code was auto-generated by tolua#, do not modify it
|
||||
using System;
|
||||
using LuaInterface;
|
||||
|
||||
public class GameCore_Singleton_GameLogic_ConfigManagerWrap
|
||||
{
|
||||
public static void Register(LuaState L)
|
||||
{
|
||||
L.BeginClass(typeof(GameCore.Singleton<GameLogic.ConfigManager>), typeof(System.Object), "Singleton_GameLogic_ConfigManager");
|
||||
L.RegFunction("__tostring", ToLua.op_ToString);
|
||||
L.RegVar("Instance", get_Instance, null);
|
||||
L.EndClass();
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int get_Instance(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
ToLua.PushObject(L, GameCore.Singleton<GameLogic.ConfigManager>.Instance);
|
||||
return 1;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 67952d9124f8ab5498b0ac978bcbdea7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -53,6 +53,7 @@ public class GameLogic_AppConstWrap
|
|||
L.RegVar("LaQi_JoinRoom_Url", get_LaQi_JoinRoom_Url, set_LaQi_JoinRoom_Url);
|
||||
L.RegVar("LoadingMD5Flie", get_LoadingMD5Flie, null);
|
||||
L.RegVar("GameVersionFile", get_GameVersionFile, null);
|
||||
L.RegVar("GameConfigFile", get_GameConfigFile, null);
|
||||
L.RegVar("UserId", get_UserId, set_UserId);
|
||||
L.RegVar("Token", get_Token, set_Token);
|
||||
L.RegVar("SdkId", get_SdkId, set_SdkId);
|
||||
|
@ -730,6 +731,20 @@ public class GameLogic_AppConstWrap
|
|||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int get_GameConfigFile(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
LuaDLL.lua_pushstring(L, GameLogic.AppConst.GameConfigFile);
|
||||
return 1;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int get_UserId(IntPtr L)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,150 @@
|
|||
//this source code was auto-generated by tolua#, do not modify it
|
||||
using System;
|
||||
using LuaInterface;
|
||||
|
||||
public class GameLogic_ConfigManagerWrap
|
||||
{
|
||||
public static void Register(LuaState L)
|
||||
{
|
||||
L.BeginClass(typeof(GameLogic.ConfigManager), typeof(GameCore.Singleton<GameLogic.ConfigManager>));
|
||||
L.RegFunction("Init", Init);
|
||||
L.RegFunction("SetNetInfo", SetNetInfo);
|
||||
L.RegFunction("GetConfigInfo", GetConfigInfo);
|
||||
L.RegFunction("GetConfigNetInfo", GetConfigNetInfo);
|
||||
L.RegFunction("GetConfigPersistentInfo", GetConfigPersistentInfo);
|
||||
L.RegFunction("GetConfigStreamingInfo", GetConfigStreamingInfo);
|
||||
L.RegFunction("New", _CreateGameLogic_ConfigManager);
|
||||
L.RegFunction("__tostring", ToLua.op_ToString);
|
||||
L.EndClass();
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int _CreateGameLogic_ConfigManager(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
int count = LuaDLL.lua_gettop(L);
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
GameLogic.ConfigManager obj = new GameLogic.ConfigManager();
|
||||
ToLua.PushObject(L, obj);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: GameLogic.ConfigManager.New");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int Init(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
ToLua.CheckArgsCount(L, 1);
|
||||
GameLogic.ConfigManager obj = (GameLogic.ConfigManager)ToLua.CheckObject<GameLogic.ConfigManager>(L, 1);
|
||||
obj.Init();
|
||||
return 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int SetNetInfo(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
ToLua.CheckArgsCount(L, 2);
|
||||
GameLogic.ConfigManager obj = (GameLogic.ConfigManager)ToLua.CheckObject<GameLogic.ConfigManager>(L, 1);
|
||||
string arg0 = ToLua.CheckString(L, 2);
|
||||
obj.SetNetInfo(arg0);
|
||||
return 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int GetConfigInfo(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
ToLua.CheckArgsCount(L, 2);
|
||||
GameLogic.ConfigManager obj = (GameLogic.ConfigManager)ToLua.CheckObject<GameLogic.ConfigManager>(L, 1);
|
||||
string arg0 = ToLua.CheckString(L, 2);
|
||||
string o = obj.GetConfigInfo(arg0);
|
||||
LuaDLL.lua_pushstring(L, o);
|
||||
return 1;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int GetConfigNetInfo(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
ToLua.CheckArgsCount(L, 2);
|
||||
GameLogic.ConfigManager obj = (GameLogic.ConfigManager)ToLua.CheckObject<GameLogic.ConfigManager>(L, 1);
|
||||
string arg0 = ToLua.CheckString(L, 2);
|
||||
string o = obj.GetConfigNetInfo(arg0);
|
||||
LuaDLL.lua_pushstring(L, o);
|
||||
return 1;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int GetConfigPersistentInfo(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
ToLua.CheckArgsCount(L, 2);
|
||||
GameLogic.ConfigManager obj = (GameLogic.ConfigManager)ToLua.CheckObject<GameLogic.ConfigManager>(L, 1);
|
||||
string arg0 = ToLua.CheckString(L, 2);
|
||||
string o = obj.GetConfigPersistentInfo(arg0);
|
||||
LuaDLL.lua_pushstring(L, o);
|
||||
return 1;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
||||
static int GetConfigStreamingInfo(IntPtr L)
|
||||
{
|
||||
try
|
||||
{
|
||||
ToLua.CheckArgsCount(L, 2);
|
||||
GameLogic.ConfigManager obj = (GameLogic.ConfigManager)ToLua.CheckObject<GameLogic.ConfigManager>(L, 1);
|
||||
string arg0 = ToLua.CheckString(L, 2);
|
||||
string o = obj.GetConfigStreamingInfo(arg0);
|
||||
LuaDLL.lua_pushstring(L, o);
|
||||
return 1;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return LuaDLL.toluaL_exception(L, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 467effe90bc1d524a8830982f9034e0f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -50,6 +50,7 @@ public static class LuaBinder
|
|||
GameCore_UnitySingleton_SDK_SDKManagerWrap.Register(L);
|
||||
GameCore_UnitySingleton_GameLogic_ImageDownloadManagerWrap.Register(L);
|
||||
GameCore_Singleton_GameLogic_VersionManagerWrap.Register(L);
|
||||
GameCore_Singleton_GameLogic_ConfigManagerWrap.Register(L);
|
||||
GameCore_Singleton_GameLogic_UpdateManagerWrap.Register(L);
|
||||
GameCore_UnitySingleton_GameLogic_PhoneManagerWrap.Register(L);
|
||||
GameCore_UnitySingleton_GameLogic_ObjectPoolManagerWrap.Register(L);
|
||||
|
@ -258,6 +259,7 @@ public static class LuaBinder
|
|||
GameLogic_UIDepthAdapterWrap.Register(L);
|
||||
GameLogic_ImageDownloadManagerWrap.Register(L);
|
||||
GameLogic_VersionManagerWrap.Register(L);
|
||||
GameLogic_ConfigManagerWrap.Register(L);
|
||||
GameLogic_UpdateManagerWrap.Register(L);
|
||||
GameLogic_PhoneManagerWrap.Register(L);
|
||||
GameLogic_EventTriggerListenerWrap.Register(L);
|
||||
|
|
Loading…
Reference in New Issue