summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XDocComponent.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/XDocComponent.cs
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XDocComponent.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/XDocComponent.cs39
1 files changed, 39 insertions, 0 deletions
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<XEventMgr>.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);
+ }
+}