private void SetupUseToolConfirmDialog(EndlessToolDataItem toolData) { object[] replaceParams = new object[] { toolData.GetDisplayTitle() }; string text = LocalizationGeneralLogic.GetText("Menu_Desc_EndlessComfirmUse", replaceParams); if (toolData.ShowIcon) { if (toolData.ApplyToSelf) { List <EndlessToolDataItem> appliedToolDataList = Singleton <EndlessModule> .Instance.GetAppliedToolDataList(); for (int i = 0; i < appliedToolDataList.Count; i++) { if (appliedToolDataList[i].ID == toolData.ID) { object[] objArray2 = new object[] { toolData.GetDisplayTitle() }; text = LocalizationGeneralLogic.GetText("Menu_Desc_EndlessComfirmReuse", objArray2); break; } } } else if ((toolData.ToolType != 3) && (this._selectPlayer != null)) { List <EndlessWaitEffectItem> list2 = this._selectPlayer.get_wait_effect_item_list(); for (int j = 0; j < list2.Count; j++) { if (list2[j].get_item_id() == toolData.ID) { object[] objArray3 = new object[] { toolData.GetDisplayTitle() }; text = LocalizationGeneralLogic.GetText("Menu_Desc_EndlessComfirmReuse", objArray3); break; } } } } if (Singleton <EndlessModule> .Instance.SelfInvisible()) { text = text + Environment.NewLine + LocalizationGeneralLogic.GetText("Menu_Desc_InvisibleItemWillLoseEffectHint", new object[0]); } GeneralDialogContext dialogContext = new GeneralDialogContext { type = GeneralDialogContext.ButtonType.DoubleButton, title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0]), desc = text, buttonCallBack = new Action <bool>(this.OnConfirmUseTool), notDestroyAfterTouchBG = true, destroyCallBack = new Action(this.ClearSelectPlayer) }; Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any); }
private void ShowEndlessToolEffect(EndlessToolDataItem toolData, UseEndlessItemRsp rsp) { Singleton <MainUIManager> .Instance.ShowUIEffect(base.config.contextName, toolData.EffectPrefatPath); object[] replaceParams = new object[] { toolData.GetDisplayTitle() }; string text = LocalizationGeneralLogic.GetText("Menu_Desc_EndlessUseSuccess", replaceParams); Singleton <MainUIManager> .Instance.ShowDialog(new GeneralHintDialogContext(text, 2f), UIType.Any); }
private bool CheckIfBombBurst() { EndlessToolDataItem justBurstBombData = Singleton <EndlessModule> .Instance.justBurstBombData; if (justBurstBombData != null) { Singleton <MainUIManager> .Instance.ShowUIEffect(base.config.contextName, justBurstBombData.EffectPrefatPath); object[] replaceParams = new object[] { justBurstBombData.GetDisplayTitle() }; string text = LocalizationGeneralLogic.GetText("Menu_Desc_ExplodedByOther", replaceParams); Singleton <MainUIManager> .Instance.ShowDialog(new GeneralHintDialogContext(text, 2f), UIType.Any); Singleton <EndlessModule> .Instance.justBurstBombData = null; } return(false); }