//--------------------------------------------------------------------- public void Launch() { // 计算PathMgr中的动态目录 bool version_persistent = false; if (!string.IsNullOrEmpty(Config.VersionCommonPersistent) && !string.IsNullOrEmpty(Config.VersionDataPersistent)) { version_persistent = true; } if (!version_persistent || PathMgr.ForceUseDirResourcesLaunch) { PathMgr.DirLaunchLua = "Lua/Launch/"; PathMgr.DirLaunchLuaType = DirType.Resources; PathMgr.DirLaunchAb = "Resources.KingTexasLaunch/"; PathMgr.DirLaunchAbType = DirType.Resources; } else { PathMgr.DirLaunchLua = PathMgr.CombinePersistentDataPath("Lua/Launch/"); PathMgr.DirLaunchLuaType = DirType.Raw; PathMgr.DirLaunchAb = PathMgr.CombinePersistentDataPath("Resources.KingTexasLaunch/"); PathMgr.DirLaunchAbType = DirType.Raw; } if (PathMgr.ForceUseDirDataOss) { string p = Path.Combine(Environment.CurrentDirectory, "./DataOss/"); var di = new DirectoryInfo(p); string p1 = di.FullName.Replace('\\', '/'); PathMgr.DirLuaRoot = p1 + "Common/Lua/"; PathMgr.DirRawRoot = p1 + "Common/Raw/"; PathMgr.DirAbRoot = p1 + Config.Platform + "/Resources.KingTexas/"; } else { PathMgr.DirLuaRoot = PathMgr.CombinePersistentDataPath("Lua/"); PathMgr.DirRawRoot = PathMgr.CombinePersistentDataPath("Raw/"); PathMgr.DirAbRoot = PathMgr.CombinePersistentDataPath("Resources.KingTexas/"); } #if UNITY_EDITOR string info1 = string.Format("DirLaunchLua={0}, DirLaunchLuaType={1}", PathMgr.DirLaunchLua, PathMgr.DirLaunchLuaType); Debug.Log(info1); string info2 = string.Format("DirLaunchAb={0}, DirLaunchAbType={1}", PathMgr.DirLaunchAb, PathMgr.DirLaunchAbType); Debug.Log(info2); Debug.Log("DirLuaRoot=" + PathMgr.DirLuaRoot); Debug.Log("DirRawRoot=" + PathMgr.DirRawRoot); Debug.Log("DirAbRoot=" + PathMgr.DirAbRoot); #endif PathMgr.DirAbUi = PathMgr.DirAbRoot + "Ui/"; // "Resources.KingTexas/Ui/",需动态计算 PathMgr.DirAbCard = PathMgr.DirAbRoot + "Cards/"; // "Resources.KingTexas/Cards/",需动态计算 PathMgr.DirAbAudio = PathMgr.DirAbRoot + "Audio/"; // "Resources.KingTexas/Audio/",需动态计算 PathMgr.DirAbItem = PathMgr.DirAbRoot + "Item/"; // "Resources.KingTexas/Item/",需动态计算 PathMgr.DirAbParticle = PathMgr.DirAbRoot + "Particle/"; // "Resources.KingTexas/Particle/",需动态计算 LuaMgr.Launch(); }
//--------------------------------------------------------------------- public void Launch() { // 计算PathMgr中的动态目录 bool version_persistent = false; if (!string.IsNullOrEmpty(Config.VersionCommonPersistent) && !string.IsNullOrEmpty(Config.VersionDataPersistent)) { version_persistent = true; } if (!version_persistent) { PathMgr.DirLaunchAb = "Resources.KingTexasLaunch/"; PathMgr.DirLaunchAbType = DirType.Resources; } else { PathMgr.DirLaunchAb = PathMgr.CombinePersistentDataPath("Resources.KingTexasLaunch/"); PathMgr.DirLaunchAbType = DirType.Raw; } if (IsEditorDebug) { string p = Path.Combine(System.Environment.CurrentDirectory, "./DataOss/"); var di = new DirectoryInfo(p); string p1 = di.FullName.Replace('\\', '/'); string lua_root = System.Environment.CurrentDirectory + "/Assets/Script.Lua/"; PathMgr.DirLuaRoot = lua_root.Replace('\\', '/'); PathMgr.DirRawRoot = p1 + "Common/Raw/"; PathMgr.DirAbRoot = p1 + Config.Platform + "/Resources.KingTexas/"; } else { PathMgr.DirLuaRoot = PathMgr.CombinePersistentDataPath("Lua/"); PathMgr.DirRawRoot = PathMgr.CombinePersistentDataPath("Raw/"); PathMgr.DirAbRoot = PathMgr.CombinePersistentDataPath("Resources.KingTexas/"); } PathMgr.DirCsRoot = PathMgr.CombinePersistentDataPath("Cs/"); PathMgr.DirAbUi = PathMgr.DirAbRoot + "Ui/"; // "Resources.KingTexas/Ui/",需动态计算 PathMgr.DirAbCard = PathMgr.DirAbRoot + "Cards/"; // "Resources.KingTexas/Cards/",需动态计算 PathMgr.DirAbAudio = PathMgr.DirAbRoot + "Audio/"; // "Resources.KingTexas/Audio/",需动态计算 PathMgr.DirAbItem = PathMgr.DirAbRoot + "Item/"; // "Resources.KingTexas/Item/",需动态计算 PathMgr.DirAbParticle = PathMgr.DirAbRoot + "Particle/"; // "Resources.KingTexas/Particle/",需动态计算 LuaMgr.Launch(!version_persistent); CsRuntime = new CasinosILRuntime(); CsRuntime.Create(); }