12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System;
- namespace ET
- {
-
-
-
-
- public interface IGetComponent
- {
- }
-
- public interface IGetComponentSystem: ISystemType
- {
- void Run(Entity o, Entity component);
- }
- [ObjectSystem]
- public abstract class GetComponentSystem<T> : IGetComponentSystem where T: Entity, IGetComponent
- {
- void IGetComponentSystem.Run(Entity o, Entity component)
- {
- this.GetComponent((T)o, component);
- }
- Type ISystemType.SystemType()
- {
- return typeof(IGetComponentSystem);
- }
- InstanceQueueIndex ISystemType.GetInstanceQueueIndex()
- {
- return InstanceQueueIndex.None;
- }
- Type ISystemType.Type()
- {
- return typeof(T);
- }
- protected abstract void GetComponent(T self, Entity component);
- }
- }
|