CTT/Unity/Assets/Model/Core/Object/IStartSystem.cs

27 lines
332 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
using System;
namespace ET
{
public interface IStartSystem
{
Type Type();
void Run(object o);
}
[ObjectSystem]
public abstract class StartSystem<T> : IStartSystem
{
public void Run(object o)
{
this.Start((T)o);
}
public Type Type()
{
return typeof(T);
}
public abstract void Start(T self);
}
}