summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XDocComponent.cs
blob: 4365dfcdd8c0dff380ac5fb57a0d38949e67eb7f (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
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);
	}
}