예제 #1
0
    // Use this for initialization
    void Start()
    {
        Screen.sleepTimeout = SleepTimeout.NeverSleep;


        DodSdkListener.Init();
        ///初始native库
        DodNativeMgr.Init();
        ///初始化基础库
        BaseLibMgr.InitLib();
        AssetVersionMgr.Instance.Init();

        if (XGameStartParamData.fromGrayUpdate)
        {
            StartCoroutine(CrtUpdateFromGrayUpdate(XGameStartParamData.grayVerInfo));
            return;
        }

        if (XGameStartParamData.fromRepairClient)
        {
            StartCoroutine(CrtUpdateFromRepairClient());
            return;
        }

        InitAbStartup();

        EventLogReport.Instance.ReportEvent(EventLogType.event_startup);

        ///判断是否有可用的存储空间
        string dataPath = ReleaseUtil.GetDataDir();

        if (string.IsNullOrEmpty(dataPath))
        {
            EventLogReport.Instance.ReportEvent(EventLogType.event_fail_startup, "find sdcard failed");
            ShowText(StartupTextConfigMgr.Instance.GetText(StartupTextDefine.ID_STARTUP_FIND_SDCARD_FAILD));
            return;
        }

        //添加logo 处理
        var imgLogo = DUnityUtil.FindChildComponent <Image>(transform, "Logo");

        if (imgLogo != null)
        {
            UIReleaseTextureHelper.SetReleaseLogo(imgLogo, UIReleaseTextureHelper.LOGO_TEXTURE_NAME, true);
        }

        var imgBg = DUnityUtil.FindChildComponent <Image>(transform, "Background1");

        if (imgBg != null)
        {
            UIReleaseTextureHelper.SetReleaseLogo(imgBg, UIReleaseTextureHelper.START_TEXTURE_NAME, false);
        }

        StartCoroutine(GameStartup());
    }
예제 #2
0
 //获取AB路径
 private string GetAbDir()
 {
     return(ReleaseUtil.GetDataDir() + "/StreamingAssets/ab/");
 }