From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- Client/Assets/Scripts/XMainClient/XDocComponent.cs | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XDocComponent.cs (limited to 'Client/Assets/Scripts/XMainClient/XDocComponent.cs') diff --git a/Client/Assets/Scripts/XMainClient/XDocComponent.cs b/Client/Assets/Scripts/XMainClient/XDocComponent.cs new file mode 100644 index 00000000..4365dfcd --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XDocComponent.cs @@ -0,0 +1,39 @@ +using System; +using XUtliPoolLib; + +namespace XMainClient +{ + internal abstract class XDocComponent : XComponent + { + public override void InitilizeBuffer() + { + XSingleton.singleton.GetBuffer(ref this._eventMap, 4); + } + + protected override void EventSubscribe() + { + base.RegisterEvent(XEventDefine.XEvent_OnReconnected, new XComponent.XEventHandler(this.Reconnect)); + } + + protected bool Reconnect(XEventArgs args) + { + XReconnectedEventArgs arg = args as XReconnectedEventArgs; + this.OnReconnected(arg); + return true; + } + + public virtual void OnEnterSceneFinally() + { + } + + public virtual void OnSceneStarted() + { + } + + public virtual void OnGamePause(bool pause) + { + } + + protected abstract void OnReconnected(XReconnectedEventArgs arg); + } +} -- cgit v1.1-26-g67d0