mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] 接入ET8服务端
[+] 接入ET8服务端
This commit is contained in:
39
Assets/GameScripts/DotNet/Core/Entity/IDestroySystem.cs
Normal file
39
Assets/GameScripts/DotNet/Core/Entity/IDestroySystem.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
|
||||
namespace ET
|
||||
{
|
||||
public interface IDestroy
|
||||
{
|
||||
}
|
||||
|
||||
public interface IDestroySystem: ISystemType
|
||||
{
|
||||
void Run(Entity o);
|
||||
}
|
||||
|
||||
[EntitySystem]
|
||||
public abstract class DestroySystem<T> : IDestroySystem where T: Entity, IDestroy
|
||||
{
|
||||
void IDestroySystem.Run(Entity o)
|
||||
{
|
||||
this.Destroy((T)o);
|
||||
}
|
||||
|
||||
Type ISystemType.SystemType()
|
||||
{
|
||||
return typeof(IDestroySystem);
|
||||
}
|
||||
|
||||
int ISystemType.GetInstanceQueueIndex()
|
||||
{
|
||||
return InstanceQueueIndex.None;
|
||||
}
|
||||
|
||||
Type ISystemType.Type()
|
||||
{
|
||||
return typeof(T);
|
||||
}
|
||||
|
||||
protected abstract void Destroy(T self);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user