/// <summary> /// After Init Modules, coroutine /// </summary> /// <returns></returns> public override IEnumerator OnGameStart() { // Print AppConfigs Log.Info("======================================= Read Settings from C# ================================="); foreach (GameConfigSetting setting in GameConfigSettings.GetAll()) { Debug.Log(string.Format("C# Read Setting, Key: {0}, Value: {1}", setting.Id, setting.Value)); } yield return(null); //初始化交给Init.lua // // 测试Collect函数,立即回收所有资源 // var path = "ui/billboard.prefab"; // var assetLoader = InstanceAssetLoader.Load(path); // while (!assetLoader.IsCompleted) // yield return null; // var assetLoader2 = InstanceAssetLoader.Load(path); // while (!assetLoader2.IsCompleted) // yield return null; // assetLoader2.Release(); // assetLoader.Release(); KResourceModule.Collect(); }
/// <summary> /// After Init Modules, coroutine /// </summary> /// <returns></returns> public override IEnumerator OnFinishInitModules() { // Print AppConfigs Log.Info("======================================= Read Settings from C# ================================="); foreach (GameConfigSetting setting in GameConfigSettings.GetAll()) { Debug.Log(string.Format("C# Read Setting, Key: {0}, Value: {1}", setting.Id, setting.Value)); } yield return(null); Log.Info("======================================= Open Window 'Login' ================================="); UIModule.Instance.OpenWindow("Login", 888); // 开始加载我们的公告界面! //UIModule.Instance.OpenWindow("Billboard"); }
/// <summary> /// After Init Modules, coroutine /// </summary> /// <returns></returns> public override IEnumerator OnGameStart() { // Print AppConfigs Log.Info("======================================= Read Settings from C# ================================="); foreach (GameConfigSetting setting in GameConfigSettings.GetAll()) { Debug.Log(string.Format("C# Read Setting, Key: {0}, Value: {1}", setting.Id, setting.Value)); } yield return(null); Log.Info("======================================= Open Window 'Login' ================================="); UIModule.Instance.OpenWindow("Login", 888); // Test Load a scene in asset bundle SceneLoader.Load("Scene/TestScene/TestScene.unity"); // 开始加载我们的公告界面! //UIModule.Instance.OpenWindow("Billboard"); }
/// <summary> /// After Init Modules, coroutine /// </summary> /// <returns></returns> public override IEnumerator OnGameStart() { // Print AppConfigs Log.Info("======================================= Read Settings from C# ================================="); foreach (GameConfigSetting setting in GameConfigSettings.GetAll()) { Debug.Log(string.Format("C# Read Setting, Key: {0}, Value: {1}", setting.Id, setting.Value)); } yield return(null); Log.Info("======================================= Open Window 'Login' ================================="); UIModule.Instance.OpenWindow("Login", 888); // Test Load a scene in asset bundle SceneManager.LoadScene("Scene/TestScene/TestScene.unity"); // 开始加载我们的公告界面! //UIModule.Instance.OpenWindow("Billboard"); // 测试Collect函数,立即回收所有资源 var path = "ui/billboard.prefab"; var assetLoader = InstanceAssetLoader.Load(path); while (!assetLoader.IsCompleted) { yield return(null); } var assetLoader2 = InstanceAssetLoader.Load(path); while (!assetLoader2.IsCompleted) { yield return(null); } assetLoader2.Release(); assetLoader.Release(); KResourceModule.Collect(); }
/// <summary> /// After Init Modules, coroutine /// </summary> /// <returns></returns> public override IEnumerator OnGameStart() { // Print AppConfigs Log.Info("======================================= Read Settings from C# ================================="); foreach (GameConfigSetting setting in GameConfigSettings.GetAll()) { Debug.Log(string.Format("C# Read Setting, Key: {0}, Value: {1}", setting.Id, setting.Value)); } yield return(null); Log.Info("======================================= Open Window 'Login' ================================="); //UIModule.Instance.OpenWindow(wndName); // Test Load a scene in asset bundle //SceneLoader.Load("Scene/TestScene/TestScene.unity"); // 开始加载我们的公告界面! //UIModule.Instance.OpenWindow("Billboard"); // 测试Collect函数,立即回收所有资源 KResourceModule.Collect(); Messenger.Broadcast(GameDefine.MessageId_Local.GameStart.ToString()); }