Project_WL/Assets/ThirdParty/StompyRobot/SRF/Scripts/Service/SRServiceBase.cs

18 lines
409 B
C#
Raw Normal View History

2024-12-15 01:39:39 +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>();
}
}
}