summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/UI/CrossGVGCombatHandler.cs
blob: 0b207b0e2814be59ea1b01201db17ad41fd5b91c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
using System;
using KKSG;
using UILib;

namespace XMainClient.UI
{
	internal class CrossGVGCombatHandler : GVGCombatHandlerBase
	{
		protected override string FileName
		{
			get
			{
				return "Guild/CrossGVG/CrossGVGCombatFrame";
			}
		}

		protected override bool InGVGTime
		{
			get
			{
				return this._doc.TimeStep == CrossGvgTimeState.CGVG_Guess || this._doc.TimeStep == CrossGvgTimeState.CGVG_Knockout || this._doc.TimeStep == CrossGvgTimeState.CGVG_SeasonEnd;
			}
		}

		protected override CrossGvgRoomState RoomState
		{
			get
			{
				return this._doc.RoomState;
			}
		}

		protected override bool VisibelEnterBattle
		{
			get
			{
				return this._doc.VisibleEnterBattle;
			}
		}

		protected override bool HasGVGJion
		{
			get
			{
				return this._doc.HasAvailableJoin;
			}
		}

		private XCrossGVGDocument _doc;

		private IXUILabel _SupportLabel;

		private IXUIButton _helpSprite;

		protected override void Init()
		{
			base.Init();
			this._doc = XDocuments.GetSpecificDocument<XCrossGVGDocument>(XCrossGVGDocument.uuID);
			this.m_helpLabel.SetText(XStringDefineProxy.GetString("CrossGVG_combat_message"));
			this._SupportLabel = (base.transform.Find("Support").GetComponent("XUILabel") as IXUILabel);
			this._helpSprite = (base.transform.Find("Title/Help").GetComponent("XUIButton") as IXUIButton);
			this._helpSprite.SetVisible(false);
			this.m_showRank.SetVisible(false);
		}

		protected override void SetupOtherInfo()
		{
			this._SupportLabel.SetText(this._doc.ToSupportString());
			this.m_RegistrationCount.SetText(XStringDefineProxy.GetString("GUILD_ARENA_INDEX", new object[]
			{
				this._doc.RegisterationCount
			}));
		}

		protected override XGVGCombatGroupData GetCombatGroup(uint roomID)
		{
			XGVGCombatGroupData result = null;
			this._doc.TryGetCombatRoom(roomID, out result);
			return result;
		}

		protected override void EnterScene()
		{
			this._doc.SendCrossGVGOper(CrossGvgOperType.CGOT_EnterKnockout, 0UL);
		}
	}
}