예제 #1
0
        IEnumerator Start()
        {
            var log     = QLog.Instance;
            var console = QConsole.Instance;

            yield return(QFramework.Instance.Init());

            // 配置文件加载 类似PlayerPrefs
            QSetting.Load();

            switch (QApp.Instance.mode)
            {
            case QAppMode.Developing:
            {
                yield return(GetComponent <ITestEntry> ().Launch());
            }
            break;

            case QAppMode.QA:
            {
            }
            break;

            case QAppMode.Release:
                yield return(GameManager.Instance.Launch());

                break;
            }
        }
예제 #2
0
        /// <summary>
        /// 进入游戏
        /// </summary>
        IEnumerator ApplicationDidFinishLaunching()
        {
            // 配置文件加载 类似PlayerPrefs
            QSetting.Load();

            // 日志输出
            var log = QLog.Instance;

            var console = QConsole.Instance;

            // 初始化框架
            yield return(QFramework.Instance.Init());


            yield return(QUGUIMgr.Init());

            yield return(GameMgr.Instance.Init());

            // 加载配置表和固定的数据
            yield return(ConfigManager.Instance.Init());

            // 初始化内存数据,可更改的数据
            yield return(InfoManager.Instance.Init());

            // 音频资源加载
            yield return(SoundManager.Instance.Init());

            yield return(QResMgr.Instance.LoadAB(QAB.SOUND.BUNDLENAME));


            // 进入测试逻辑
            if (QApp.Instance.mode == QAppMode.Developing)
            {
                yield return(GetComponent <ITestEntry> ().Launch());

                // 进入正常游戏逻辑
            }
            else
            {
                yield return(GameMgr.Instance.Launch());
            }

            yield return(null);
        }