You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/3rd/StompyRobot/SRF/Scripts/Service/SRServiceBase.cs

18 lines
409 B
C#

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>();
}
}
}