public string Get_Buff_Icon(int buffid) { if (this.buff_icons.ContainsKey(buffid)) { return(this.buff_icons.get_Item(buffid)); } return(string.Format(UT.GetText("Burn_Error_Find_Buff"), buffid)); }
public string Get_Buff_Description(int buffid) { if (this.buff_ids.ContainsKey(buffid)) { return(this.buff_ids[buffid]); } return(string.Format(UT.GetText("Burn_Error_Find_Buff"), buffid)); }
public void Show_ResetNum(int num) { if (this.resetNumText != null) { this.resetNumText.gameObject.CustomSetActive(true); string text = string.Format("<color=#be7d15ff>{0}</color>", num); this.resetNumText.text = string.Format(UT.GetText("Burn_Valid_Count"), text); } }
private void On_Burn_Reset(CUIEvent uievent) { if (this.model.Get_ResetNum(this.model.curDifficultyType) > 0) { Singleton <CUIManager> .instance.OpenMessageBoxWithCancel(UT.GetText("Burn_Buy_Count_Tip"), enUIEventID.Burn_Reset_Ok, enUIEventID.Burn_Reset_Cancel, false); } else { Singleton <CUIManager> .GetInstance().OpenMessageBox(UT.GetText("Burn_Error_OutOfCount"), false); } }
public static void Handle_Burn_Settle(ref SCPKG_SINGLEGAMEFINRSP rsp) { if (rsp.iErrCode == 0) { if (rsp.stDetail.stGameInfo.bGameResult == 1) { Finish_Level(Singleton <BurnExpeditionController> .GetInstance().model.curSelect_LevelIndex); } } else { Singleton <CUIManager> .GetInstance().OpenMessageBox(string.Format(UT.GetText("Burn_Error_Settle_Failed"), rsp.iErrCode), false); } }
private void On_RESET_BURNING_PROGRESS_RSP(CSPkg obj) { SCPKG_RESET_BURNING_PROGRESS_RSP stResetBurningProgressRsp = obj.stPkgData.get_stResetBurningProgressRsp(); if (stResetBurningProgressRsp.iErrCode == 0) { this.model.RandomRobotIcon(); this.model.Reset_Data(); this.model.SetLevelDetail(this.model.curDifficultyType, stResetBurningProgressRsp.stNewProgress.get_stOfSucc()); this.model.CalcProgress(); Singleton <EventRouter> .GetInstance().BroadCastEvent("Burn_PROGRESS_Change"); } else { Singleton <CUIManager> .GetInstance().OpenMessageBox(string.Format(UT.GetText("Burn_Error_Reset"), stResetBurningProgressRsp.iErrCode), false); } }
private void _Show_Icon(Image img, uint configID) { if (configID == 0u) { return; } CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null) { img.SetSprite(CUIUtility.s_Sprite_Dynamic_Icon_Dir + masterRoleInfo.GetHeroSkinPic(configID), this.map_fromScript, true, false, false, false); } else { Singleton <CUIManager> .GetInstance().OpenMessageBox(string.Format(UT.GetText("Burn_Error_Show_Hero"), configID), false); } }
private void On_GET_BURNING_PROGRESS_RSP(CSPkg obj) { SCPKG_GET_BURNING_PROGRESS_RSP stGetBurningProgressRsp = obj.stPkgData.get_stGetBurningProgressRsp(); if (stGetBurningProgressRsp.iErrCode == 0) { if (this.model != null) { this.model.RandomRobotIcon(); if (stGetBurningProgressRsp.stBurningProgress != null && this.model != null) { this.model.SetProgress(stGetBurningProgressRsp.stBurningProgress); } Singleton <EventRouter> .GetInstance().BroadCastEvent("Burn_PROGRESS_Change"); } } else { Singleton <CUIManager> .GetInstance().OpenMessageBox(string.Format(UT.GetText("Burn_Error_Progress"), stGetBurningProgressRsp.iErrCode), false); } }
private void On_GET_BURNING_REWARD_RSP(CSPkg msg) { SCPKG_GET_BURNING_REWARD_RSP stGetBurningRewardRsp = msg.stPkgData.get_stGetBurningRewardRsp(); if (stGetBurningRewardRsp.iErrCode == 0) { if (stGetBurningRewardRsp.stRewardDetail.get_stOfSucc().bNextLevelNo != 0) { this.model.Set_ENEMY_TEAM_INFO(this.model.curDifficultyType, (int)(stGetBurningRewardRsp.stRewardDetail.get_stOfSucc().bNextLevelNo - 1), stGetBurningRewardRsp.stRewardDetail.get_stOfSucc().stNextEnemyInfo); } ListView <CUseable> useableListFromReward = CUseableManager.GetUseableListFromReward(stGetBurningRewardRsp.stRewardDetail.get_stOfSucc().stReward); for (int i = 0; i < useableListFromReward.get_Count(); i++) { useableListFromReward.get_Item(i).SetMultiple(ref stGetBurningRewardRsp.stRewardDetail.get_stOfSucc().stMultipleDetail, true); } Singleton <CUIManager> .GetInstance().OpenAwardTip(LinqS.ToArray <CUseable>(useableListFromReward), null, false, enUIEventID.None, false, false, "Form_Award"); this.model.FinishBox(this.model.curSelect_BoxIndex); if (this.model.curSelect_BoxIndex <= BurnExpeditionController.Max_Level_Index - 1) { this.model.UnLockLevel(this.model.curSelect_BoxIndex + 1); if (this.view != null) { this.view.Show_Line(this.model.curSelect_BoxIndex + 1); } } this.model.CalcProgress(); if (this.view != null) { this.view.Show_Map(); } } else if (stGetBurningRewardRsp.iErrCode != 12) { Singleton <CUIManager> .GetInstance().OpenMessageBox(string.Format(UT.GetText("Burn_Error_GetAward"), stGetBurningRewardRsp.iErrCode), false); } }
public void Check_Box_Info(uint goldNum, uint burn_num) { CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm("UGUI/Form/Common/Form_Award.prefab", false, true); Utility.GetComponetInChild <Text>(cUIFormScript.gameObject, "bg/Title").text = UT.GetText("Burn_Box_Award"); GameObject gameObject = Utility.FindChild(cUIFormScript.gameObject, "IconContainer"); CUIListScript component = gameObject.GetComponent <CUIListScript>(); if (goldNum > 0u && burn_num > 0u) { component.SetElementAmount(2); } else { component.SetElementAmount(1); } int num = 0; if (goldNum > 0u) { this.Set_Award(gameObject, num, CUIUtility.s_Sprite_Dynamic_Icon_Dir + "90001", goldNum.ToString(), UT.GetText("Burn_Info_Coin"), cUIFormScript); num++; } if (burn_num > 0u) { this.Set_Award(gameObject, num, CUIUtility.s_Sprite_Dynamic_Icon_Dir + "90008", burn_num.ToString(), UT.GetText("Burn_Info_yuanzheng"), cUIFormScript); num++; } }
public void Check_Box_Info(uint goldNum, uint burn_num) { CUIFormScript formScript = Singleton <CUIManager> .GetInstance().OpenForm("UGUI/Form/Common/Form_Award.prefab", false, true); Utility.GetComponetInChild <Text>(formScript.gameObject, "bg/Title").text = UT.GetText("Burn_Box_Award"); GameObject container = Utility.FindChild(formScript.gameObject, "IconContainer"); for (int i = 0; i < container.transform.childCount; i++) { container.transform.GetChild(i).gameObject.CustomSetActive(false); } int index = 1; if (goldNum > 0) { this.Set_Award(container, index, CUIUtility.s_Sprite_Dynamic_Icon_Dir + "90001", goldNum.ToString(), UT.GetText("Burn_Info_Coin"), formScript); index++; } if (burn_num > 0) { this.Set_Award(container, index, CUIUtility.s_Sprite_Dynamic_Icon_Dir + "90008", burn_num.ToString(), UT.GetText("Burn_Info_yuanzheng"), formScript); index++; } }