44 lines
847 B
C#
44 lines
847 B
C#
using UnityEngine;
|
|
|
|
namespace ZC
|
|
{
|
|
public interface IManager
|
|
{
|
|
}
|
|
|
|
internal abstract class ManagerBase<T> : IBehaviour, IManager
|
|
{
|
|
private long _id = IDGenerator.Generate();
|
|
private bool _isDisposed = false;
|
|
private bool _isPause = false;
|
|
|
|
public long Id => this._id;
|
|
|
|
public bool isDisposed => this._isDisposed;
|
|
|
|
public bool isPause => this._isPause;
|
|
|
|
public virtual void OnInit()
|
|
{
|
|
}
|
|
|
|
public virtual void OnUpdate(float dateTime)
|
|
{
|
|
}
|
|
|
|
public virtual void OnPause()
|
|
{
|
|
this._isPause = true;
|
|
}
|
|
|
|
public virtual void OnResume()
|
|
{
|
|
this._isPause = false;
|
|
}
|
|
|
|
public virtual void OnDispose()
|
|
{
|
|
this._isDisposed = true;
|
|
}
|
|
}
|
|
} |