Example #1
0
    void OnClick()
    {
        if (_CanEnter)
        {
            //	Debug.Log (_CanEnter);
            //Debug.Log(_MyChapter.config.ID.ToString()+"OnClick<<<<<<<<<<<<"+"_MyChapter.toFightCityID:"+_MyChapter.toFightCityId.ToString());

//			if(_MyChapter != null){
//				string tName = _MyChapter.config.name.ToString ();
//				ControllerEventData ctrl = new ControllerEventData (name,"ChapterShowCellScript");
//				ActivityNetController.GetInstance ().SendCurrentUserState (ctrl);
//			}

            DBUIController.mDBUIInstance.SetViewStateWithData(RUIType.EMViewState.S_CityFloor, _MyChapter);
            UIMiniPlayerController.Instance.SetActive(false);

                        #if SPLIT_MODEL
            if (_MyChapter.config.ID >= 30300 && Core.Data.temper.BattleDownloadCnt == 0 && Core.Data.playerManager.RTData.downloadReawrd == 0)
            {
                List <SouceData> list = Core.Data.sourceManager.GetUpdateModes();
                if (list != null || list.Count > 0)
                {
                    UIDownloadPacksWindow.OpenDownLoadUI(null);
                }
                Core.Data.temper.BattleDownloadCnt++;
            }
                        #endif
        }
    }
 public static UIDownloadPacksWindow CreateWin()
 {
     UnityEngine.Object obj = PrefabLoader.loadFromPack("UIDownloadPacks/UIDownloadPacks");
     if (obj != null)
     {
         GameObject            go    = Instantiate(obj) as GameObject;
         UIDownloadPacksWindow uiDpw = go.GetComponent <UIDownloadPacksWindow>();
         //DBUIController.mDBUIInstance._TopRoot
         return(uiDpw);
     }
     return(null);
 }
 public static void CloesWin()
 {
     if (m_Instance != null)
     {
         if (Core.Data.playerManager.RTData.downloadReawrd == 1 && !Core.Data.sourceManager.DoClientNeedUpdateModles(true))
         {
             SQYMainController.mInstance.m_Download.gameObject.SetActive(false);
             SQYMainController.mInstance.ArrangeLeftBtnPos();
         }
         Destroy(m_Instance.gameObject);
         _instance = null;
     }
 }
    public static void OpenDownLoadUI(DelegateFinished callBack)
    {
        UIDownloadPacksWindow win = UIDownloadPacksWindow.CreateWin();

        if (_instance == null)
        {
            if (win != null)
            {
                _instance = win;
                win.SetWinRoot(DBUIController.mDBUIInstance._TopRoot);
            }
        }
        _instance.m_EventFinished = callBack;
    }
Example #5
0
 public void OnDownloadPacks()
 {
     //---------------------
     //------下载礼包被点击,打开下载窗口 <说明当前客户端需要下载,但不知道玩家是否已领取礼包 >
     //---------------------
     if (Core.Data.playerManager.RTData.downloadReawrd == -1)
     {
         //检测一下当前的状态
         SetDownloadFinish(true);
     }
     else
     {
         UIDownloadPacksWindow.OpenDownLoadUI(LoadFinish);
     }
 }
Example #6
0
    void Start()
    {
                #if SPLIT_MODEL
        if (FinalTrialMgr.GetInstance().m_nDownLoadTipCnt == 0 && !Core.Data.guideManger.isGuiding && Core.Data.playerManager.RTData.downloadReawrd == 0)
        {
            List <SouceData> list = Core.Data.sourceManager.GetUpdateModes();
            if (list != null || list.Count > 0)
            {
                UIDownloadPacksWindow.OpenDownLoadUI(null);
            }
            FinalTrialMgr.GetInstance().m_nDownLoadTipCnt++;
        }
                #endif
        this.RefreshTip();

        tianXiaDiYiLabel1.SafeText(Core.Data.stringManager.getString(25157));
        qiangduoLabel1.SafeText(Core.Data.stringManager.getString(25155));
        qiangduoLabel2.SafeText(Core.Data.stringManager.getString(6015));
    }
Example #7
0
    public void SetDownloadFinish(bool isClick = false)
    {
        if (Core.Data.guideManger.isGuiding)
        {
            return;
        }
        HttpTask task = new HttpTask(ThreadType.MainThread, TaskResponse.Default_Response);

        task.AppendCommonParam(RequestType.DOWNLOAD_FINISH, new DownloadFinishParam(int.Parse(Core.Data.playerManager.PlayerID), SoftwareInfo.VersionCode, 0));
        task.afterCompleted = (BaseHttpRequest request, BaseResponse response) =>
        {
            if (response != null && response.status != BaseResponse.ERROR)
            {
                GetDownloadFinishResponse FinishResponse = response as GetDownloadFinishResponse;
                if (FinishResponse.data.status >= 0)
                {
                    int state = Core.Data.playerManager.RTData.downloadReawrd;
                    Core.Data.playerManager.RTData.downloadReawrd = FinishResponse.data.status;
                    //bool show = Core.Data.sourceManager.DoClientNeedUpdateModles();
//					bool show = Core.Data.playerManager.RTData.downloadReawrd != 1;
//					RED.SetActive(show, m_Download.gameObject);
                    if (Core.Data.playerManager.RTData.downloadReawrd == 0)
                    {
                        RED.SetActive(true, m_Download.gameObject);
                        BtnGrid.Reposition();
                    }


                    if (state == -1 && isClick)
                    {
                        UIDownloadPacksWindow.OpenDownLoadUI(LoadFinish);
                    }
                }
                else
                {
                    RED.LogWarning("FinishResponse.data.status Error!!!!!");
                }
            }
        };
        task.ErrorOccured += FinishAllErrorBack;
        task.DispatchToRealHandler();
    }