30 lines
745 B
C#
30 lines
745 B
C#
|
|
namespace Stary.Evo
|
||
|
|
{
|
||
|
|
public interface ISystem: IBelongToArchitecture,ICanSetArchitecture,ICanGetData,ICanGetUtility ,ICanRegisterEvent,ICanSendEvent,ICanGetSystem
|
||
|
|
{
|
||
|
|
void Init();
|
||
|
|
void Dispose();
|
||
|
|
}
|
||
|
|
public abstract class AbstractSystem : ISystem
|
||
|
|
{
|
||
|
|
private IArchitecture mArchitecture;
|
||
|
|
IArchitecture IBelongToArchitecture.GetArchitecture()
|
||
|
|
{
|
||
|
|
return mArchitecture;
|
||
|
|
}
|
||
|
|
|
||
|
|
void ICanSetArchitecture.SetArchitecture(IArchitecture architecture)
|
||
|
|
{
|
||
|
|
mArchitecture = architecture;
|
||
|
|
}
|
||
|
|
|
||
|
|
void ISystem.Init()
|
||
|
|
{
|
||
|
|
OnInit();
|
||
|
|
}
|
||
|
|
|
||
|
|
public abstract void Dispose();
|
||
|
|
|
||
|
|
protected abstract void OnInit();
|
||
|
|
}
|
||
|
|
}
|