public void SetResult(int nIndunUnique, bool bWin, eINDUN_CLOSE_REASON eReason, long nRewardGold) { if (this.m_nIndunUnique != nIndunUnique) { return; } if (this.m_pkIndunInfo.CastedTarget.m_bShowUI) { IndunResult_DLG indunResult_DLG = (IndunResult_DLG)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.INDUN_RESULT_DLG); if (indunResult_DLG != null) { indunResult_DLG.SetReult(bWin, eReason, nRewardGold); } } this.Clear(); }
public void SetReult(bool bWin, eINDUN_CLOSE_REASON eReason, long nRewardGold) { if (bWin) { this.m_eShowLayer = IndunResult_DLG.eSHOWLAYER.eSHOWLAYER_WIN; string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1583"), "rewardgold", nRewardGold.ToString() }); this.m_lbRewardGold.SetText(empty); } else { this.m_eShowLayer = IndunResult_DLG.eSHOWLAYER.eSHOWLAYER_LOSE; string empty2 = string.Empty; switch (eReason) { case eINDUN_CLOSE_REASON.eINDUN_CLOSE_REASON_GIVEUP: NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1604"), "username", "NULL" }); break; case eINDUN_CLOSE_REASON.eINDUN_CLOSE_REASON_TIMEOVER: this.m_lbLoseReason.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1605")); break; case eINDUN_CLOSE_REASON.eINDUN_CLOSE_REASON_FAILWAR: this.m_lbLoseReason.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1606")); break; } } this.Show(); base.SetLocation(GUICamera.width / 2f - base.GetSize().x / 2f, GUICamera.height / 2f - base.GetSize().y / 2f); base.ShowLayer((int)this.m_eShowLayer); }