/// <summary> /// 同步异步标识 /// </summary> //private bool isAsync = false; /// <summary> /// 资源加载完成后的回调 /// </summary> //private Action callback; public static LocalDataMgr GetInstance() { if (null == instance) { instance = new LocalDataMgr(); } return(instance); }
/// <summary> /// 初始化游戏核心 /// </summary> public void InitGameCore(GameObject gameObject) { gameLauncherObj = gameObject; LocalDataMgr.GetInstance().LoadStartConfig(() => { }); gameObject.AddComponent <LevelMgr>(); }
/// <summary> /// 初始化游戏核心 /// </summary> public void InitGameCore(GameObject gameObject) { //初始化各种管理器 resourceMgr = ResourceMgr.GetInstance(); gameLauncherObj = gameObject; LocalDataMgr.GetInstance().LoadStartConfig(() => { resourceMgr.Init(); }); uiMgr = new UIMgr(); subSysMgr = new SubSysMgr(); levelMgr = gameObject.AddComponent <LevelMgr>(); }
/// <summary> /// 初始化游戏核心 /// </summary> public void InitGameCore(GameObject gameObject) { //将lua初始化移动到这里,所有的必要条件都准备好以后再初始化lua虚拟机 luaClient = gameObject.AddComponent <LuaEngine>(); //初始化各种管理器 resourceMgr = ResourceMgr.GetInstance(); gameLauncherObj = gameObject; LocalDataMgr.GetInstance().LoadStartConfig(() => { resourceMgr.Init(); }); uiMgr = new UIMgr(); moduleMgr = new ModuleMgr(); levelMgr = gameObject.AddComponent <LevelMgr>(); GameStart(); }
/// <summary> /// 初始化游戏核心 /// </summary> public void InitGameCore(GameObject gameObject) { //初始化各种管理器 resourceMgr = ResourceMgr.GetInstance(); //Lua的资源管理器接口 luaResourceMgr = LuaResourceMgr.GetInstance(); gameLauncherObj = gameObject; LocalDataMgr.GetInstance().LoadStartConfig(() => { resourceMgr.Init(); }); uiMgr = new UIMgr(); moduleMgr = new ModuleMgr(); sceneMgr = gameObject.AddComponent <SceneMgr>(); luaClient = gameObject.AddComponent <LuaEngine>(); GameStart(); }
private I18NHelper() { i18NDataMap = LocalDataMgr.GetLocalDataMap <I18NDataMap>(); }
public void Init() { resPathDataMap = LocalDataMgr.GetLocalDataMap <ResPathDataMap>(); }
/// <summary> /// 重新加载数据文件 /// </summary> public void ReloadI18NConfig() { i18NDataMap = LocalDataMgr.GetLocalDataMap <I18NDataMap>(); }