From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/UI/CrossGVGDuelHandler.cs | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/UI/CrossGVGDuelHandler.cs (limited to 'Client/Assets/Scripts/XMainClient/UI/CrossGVGDuelHandler.cs') diff --git a/Client/Assets/Scripts/XMainClient/UI/CrossGVGDuelHandler.cs b/Client/Assets/Scripts/XMainClient/UI/CrossGVGDuelHandler.cs new file mode 100644 index 00000000..5c8beb9d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/CrossGVGDuelHandler.cs @@ -0,0 +1,54 @@ +using System; +using KKSG; +using UILib; +using XUtliPoolLib; + +namespace XMainClient.UI +{ + internal class CrossGVGDuelHandler : GVGDuelHandlerBase + { + protected override string FileName + { + get + { + return "Guild/CrossGVG/CrossGVGDuelFrame"; + } + } + + private XCrossGVGDocument _doc; + + protected override void Init() + { + base.Init(); + this._doc = XDocuments.GetSpecificDocument(XCrossGVGDocument.uuID); + this.m_DuelHelp.SetText(XSingleton.singleton.ReplaceReturn(XStringDefineProxy.GetString("CrossGVG_duel_message"))); + } + + protected override void OnShow() + { + base.OnShow(); + this.RefreshData(); + } + + protected override int GetDuelInfoSize() + { + return this._doc.GVGDuels.Count; + } + + public override void RefreshData() + { + base.RefreshData(); + base.ShowOrHide(!this._doc.HasDuelCombat); + } + + protected override GVGDuelCombatInfo GetDuelInfo(int index) + { + return this._doc.GVGDuels[index]; + } + + protected override void OnEnterScene(IXUISprite sprite) + { + this._doc.SendCrossGVGOper(CrossGvgOperType.CGOT_EnterPointRace, 0UL); + } + } +} -- cgit v1.1-26-g67d0