/// <summary> /// 刷新BOSS排名榜 /// </summary> /// <param name="bossID">BossID</param> public void F_UpdateBossRank(int bossID) { m_CurrentBossID = bossID; if (m_AllRank == null) { m_AllRank = new Dictionary <int, List <LTLegionFBRankItemData> >(); } if (m_AllRank.ContainsKey(bossID)) { SetRank(m_AllRank[bossID]); } else { //向服器器发送请求当前的数据 m_UIServerRequest = mDMono.GetComponent <UIServerRequest>(); if (m_UIServerRequest != null) { UIServerRequestHotFix mysGetRequest = mDMono.transform.GetMonoILRComponentByClassPath <UIServerRequestHotFix>("Hotfix_LT.UI.UIServerRequestHotFix", true); m_UIServerRequest.onResponse.Add(new EventDelegate(mysGetRequest.mDMono, "OnFetchData")); } else { EB.Debug.LogError("Didnot have UIServerRequest In this object{0}", mDMono.name); } // m_UIServerRequest.parameters = new UIServerRequest.ServerParameter[1]; m_UIServerRequest.parameters[0] = new UIServerRequest.ServerParameter(); m_UIServerRequest.parameters[0].name = "BossID"; m_UIServerRequest.parameters[0].parameter = bossID.ToString(); // FetchDataRemote(); } }
public override void Awake() { base.Awake(); var t = mDMono.transform; _controllerILR = t.GetComponentInParent <UIControllerILR>(); Transform store_root = _controllerILR.transform; m_Scroll = store_root.GetMonoILRComponent <UIStoreGridScroll>("Store/NewBlacksmithView/BlacksmithViews/Shared/SlotsContainer/Placeholder/Grid"); m_GetDataRequest = t.GetComponent <UIServerRequest>("Extra/Get"); m_RefreshRequest = t.GetComponent <UIServerRequest>("Extra/Refresh"); m_BuyRequest = store_root.GetComponent <UIServerRequest>("Store/NewBlacksmithView/BlacksmithViews/Shared/Extra/Buy"); RefreshBtnRoot = store_root.GetComponent <UIButton>("Store/BGs/Bottom/Button", false); RefreshCostLabel = store_root.GetComponent <UILabel>("Store/BGs/Bottom/Button/Cost/Diamand/Label", false); m_RefreshTimeLabel = store_root.GetComponent <UILabel>("Store/BGs/Bottom/RefreshTime", false); RefreshCostSprite = store_root.GetComponent <UISprite>("Store/BGs/Bottom/Button/Cost/Diamand/Sprite", false); NewCurrencyCommonLabel = store_root.GetComponent <UILabel>("UINormalFrameBG/NewCurrency/Table/1_Common/Label"); NewCurrencyCommonSprite = store_root.GetComponent <UISprite>("UINormalFrameBG/NewCurrency/Table/1_Common/Icon"); RefreshFxObj = store_root.FindEx("Store/NewBlacksmithView/BlacksmithViews/Shared/Fx").gameObject; UIServerRequestHotFix mysGetRequest = t.GetMonoILRComponent <UIServerRequestHotFix>("Extra/Get"); mysGetRequest.response = OnRequestStoreData; t.GetComponent <UIServerRequest>("Extra/Get").onResponse.Add(new EventDelegate(mysGetRequest.mDMono, "OnFetchData")); UIServerRequestHotFix mysRefreshRequest = t.GetMonoILRComponent <UIServerRequestHotFix>("Extra/Refresh"); mysRefreshRequest.response = OnRefresh; t.GetComponent <UIServerRequest>("Extra/Refresh").onResponse.Add(new EventDelegate(mysRefreshRequest.mDMono, "OnFetchData")); UIServerRequestHotFix buyRequest = t.parent.GetMonoILRComponent <UIServerRequestHotFix>("Shared/Extra/Buy"); if (buyRequest.response == null) { buyRequest.response = OnBuy; t.parent.GetComponent <UIServerRequest>("Shared/Extra/Buy").onResponse.Add(new EventDelegate(buyRequest.mDMono, "OnFetchData")); } m_DataID = mDMono.StringParamList[0]; m_StoreType = mDMono.StringParamList[1]; m_StoreName = mDMono.StringParamList[2]; m_StoreId = mDMono.IntParamList[0]; m_Columns = mDMono.IntParamList[1]; CronRefreshExcuter re = CreateShopRefresher(); AutoRefreshingManager.Instance.AddCronRefreshExcuter(re); }
public override void Awake() { base.Awake(); var t = controller.transform; InputLabel = t.GetComponent <UIInput>("Control/Table/InputBtn"); InputLabel.onChange.Add(new EventDelegate(() => { InputLimit(InputLabel); })); CostLabel = t.GetComponent <UILabel>("Control/BG/BG/ButtonGrid/OKButton/CostLabel"); FirstRenameObj = t.FindEx("Control/BG/BG/ButtonGrid/OKButton/FreeLabel").gameObject; GeneralObj = new List <GameObject>(); GeneralObj.Add(t.FindEx("Control/BG/Title/CloseButton").gameObject); GeneralObj.Add(t.FindEx("Control/BG/BG/ButtonGrid").gameObject); GuideObj = t.FindEx("Control/GuideObj").gameObject; TitleLabel = t.GetComponent <UILabel>("Control/BG/Title/Label"); controller.backButton = t.GetComponent <UIButton>("Control/BG/Title/CloseButton"); t.GetComponent <UIButtonText>("Control/BG/BG/ButtonGrid/CancelButton").onClick.Add(new EventDelegate(OnCancelButtonClick)); t.GetComponent <UIButtonText>("Control/GuideObj/GuideGrid/RandomButton").onClick.Add(new EventDelegate(OnRandomNameBtnClick)); t.GetComponent <ConsecutiveClickCoolTrigger>("Control/BG/BG/ButtonGrid/OKButton").clickEvent.Add(new EventDelegate(OnSureBtnClick)); t.GetComponent <ConsecutiveClickCoolTrigger>("Control/GuideObj/GuideGrid/OKButton").clickEvent.Add(new EventDelegate(OnSureBtnClick)); UIServerRequestHotFix m_Request = t.GetMonoILRComponent <UIServerRequestHotFix>(); m_Request.response = OnRequestResponse; t.GetComponent <UIServerRequest>().onResponse.Add(new EventDelegate(m_Request.mDMono, "OnFetchData")); }