summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/UI/XWorldBossResultView.cs
blob: f751324cdd41e855e6692feaf6cde45e0f4723d7 (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
using System;
using UILib;
using XMainClient.UI.UICommon;
using XUtliPoolLib;

namespace XMainClient.UI
{
	internal class XWorldBossResultView : DlgBase<XWorldBossResultView, GuildDragonChallengeResultBehaviour>
	{
		public override string fileName
		{
			get
			{
				return "Battle/Comcotinue";
			}
		}

		public override int layer
		{
			get
			{
				return 1;
			}
		}

		public override bool pushstack
		{
			get
			{
				return true;
			}
		}

		private XWorldBossDocument _Doc;

		private XElapseTimer countDownTime = new XElapseTimer();

		protected override void Init()
		{
			base.Init();
			this._Doc = XDocuments.GetSpecificDocument<XWorldBossDocument>(XWorldBossDocument.uuID);
			this._Doc.WorldBossResultView = this;
		}

		public override void RegisterEvent()
		{
			base.RegisterEvent();
			base.uiBehaviour.m_ReturnBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnReturn));
		}

		private void OnReturn(IXUISprite sp)
		{
			this._Doc.ReqQutiScene();
		}

		public void ShowResult(bool isWin)
		{
			bool flag = !base.IsVisible();
			if (flag)
			{
				this.countDownTime.LeftTime = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("WorldBossGameEndCountDown"));
				this.SetVisibleWithAnimation(true, new DlgBase<XWorldBossResultView, GuildDragonChallengeResultBehaviour>.OnAnimationOver(this.StartCountDown));
				if (isWin)
				{
					base.uiBehaviour.m_Desription.SetText(XStringDefineProxy.GetString("WORLDBOSS_CHANGGLE_DES_WIN"));
				}
				else
				{
					base.uiBehaviour.m_Desription.SetText(XStringDefineProxy.GetString("WORLDBOSS_CHANGGLE_DES_FAILED"));
				}
			}
		}

		private void StartCountDown()
		{
		}

		public override void OnUpdate()
		{
			base.OnUpdate();
		}
	}
}