mergemilitary/Assets/ThirdPlugins/StompyRobot/SRF/Scripts/Service/SRServiceBase.cs

18 lines
426 B
C#
Raw Normal View History

2022-05-23 13:39:59 +00:00
namespace SRF.Service
{
public abstract class SRServiceBase<T> : SRMonoBehaviourEx where T : class
{
protected override void Awake()
{
base.Awake();
SRServiceManager.RegisterService<T>(this);
}
protected override void OnDestroy()
{
base.OnDestroy();
SRServiceManager.UnRegisterService<T>();
}
}
}