summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XDocComponent.cs
diff options
context:
space:
mode:
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);
+ }
+}