From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/XSelectCharacterDocument.cs | 105 +++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XSelectCharacterDocument.cs (limited to 'Client/Assets/Scripts/XMainClient/XSelectCharacterDocument.cs') diff --git a/Client/Assets/Scripts/XMainClient/XSelectCharacterDocument.cs b/Client/Assets/Scripts/XMainClient/XSelectCharacterDocument.cs new file mode 100644 index 00000000..418c960b --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XSelectCharacterDocument.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using KKSG; +using XMainClient.UI; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class XSelectCharacterDocument : XDocComponent + { + public override uint ID + { + get + { + return XSelectCharacterDocument.uuID; + } + } + + public XSelectCharView View + { + get + { + return this._view; + } + set + { + this._view = value; + } + } + + public int CurrentProf + { + get + { + return this._currentCreateProf; + } + set + { + this._currentCreateProf = value; + } + } + + public List RoleList + { + get + { + return this._roleList; + } + set + { + this._roleList = value; + } + } + + public new static readonly uint uuID = XSingleton.singleton.XHash("SelectCharacterDocument"); + + private int _currentCreateProf = -1; + + private int tttt = 2; + + private List _roleList = new List(); + + private XSelectCharView _view = null; + + private List testlist = new List(); + + public override void OnAttachToHost(XObject host) + { + base.OnAttachToHost(host); + this.testlist.Add(1); + this.testlist.Add(2); + this.testlist.Add(4); + } + + public void OnSelectCharBack() + { + XSingleton.singleton.Close(NetErrCode.Net_NoError); + XAutoFade.FadeOut2In(1.5f, 0.5f); + XSingleton.singleton.AddLog(string.Concat(this.tttt), null, null, null, null, null, XDebugColor.XDebug_None); + XSingleton.singleton.SetTimer(0.5f, new XTimerMgr.ElapsedEventHandler(this.BackToLoginOnClick), null); + } + + public void OnEnterWorld() + { + XSelectcharStage xselectcharStage = XSingleton.singleton.CurrentStage as XSelectcharStage; + bool flag = xselectcharStage != null; + if (flag) + { + xselectcharStage.EnterGameWorld(this._view.SelectCharIndex); + } + XMainInterfaceDocument specificDocument = XDocuments.GetSpecificDocument(XMainInterfaceDocument.uuID); + specificDocument.GameAnnouncement = false; + } + + protected override void OnReconnected(XReconnectedEventArgs arg) + { + } + + private void BackToLoginOnClick(object o) + { + XAutoFade.MakeBlack(false); + XSingleton.singleton.FromLogining(); + } + } +} -- cgit v1.1-26-g67d0