Ejemplo n.º 1
0
    /// <summary>
    /// 로그인후 로비씬 이전에 번틀 버젼채크를 하며, 완료후 로비씬 로딩이 이루어진다.
    /// </summary>
    private void AssetBundleVersionCheck()
    {
        _ProgressBar.gameObject.SetActive(true);
        _ProgressLock = false;
        _BeginTime    = Time.time;

        if ((SCENEIDs)m_args[0] == SCENEIDs.FBSignOut ||
            (SCENEIDs)m_args[0] == SCENEIDs.ReConnectServer)
        {
            NET.I.AddMessage(PKID.LobbyDisconnect);
            NET.I.AddMessage(PKID.LobbyConnect);
            if (USER.I.IsGuestLogin)
            {
                NET.I.AddMessage(PKID.GuestUserJoin);
            }
            CommonLoginNeworkConnect();
        }
        else
        {
            _ProgressBar.SetFillAmount(0.03f);
            _ProgressBar.AutoAddGague(60f, null);

            StartCoroutine(BUNDLE.I.BeginVersionCheck(() => {
                _BeginTime    = Time.time;
                _ProgressLock = false;
                StartCoroutine(BUNDLE.I.DownloadUpdateFromServer(DEF.GetLobbyBundleName(), OnBundleUpdateProgress_Lobby, () => {
                    StartCoroutine(BUNDLE.I.DownloadUpdateFromServer(DEF.GetGameCommonBundleName(), OnBundleUpdateProgress_Game, () => {
                        string prefabGameName = DEF.GetGameBundleName(DEF.FIRST_INSTALL_GAME);
                        StartCoroutine(BUNDLE.I.DownloadUpdateFromServer(prefabGameName, OnBundleUpdateProgress_Game, FirstLoginNetworkConnect));
                    }, OnLoadError));
                }, OnLoadError));
            }, OnLoadError));
        }
    }