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:
30
Assets/GameScripts/DotNet/Core/Entity/EntityHelper.cs
Normal file
30
Assets/GameScripts/DotNet/Core/Entity/EntityHelper.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
namespace ET
|
||||
{
|
||||
public static class EntityHelper
|
||||
{
|
||||
public static int Zone(this Entity entity)
|
||||
{
|
||||
return entity.IScene.Fiber.Zone;
|
||||
}
|
||||
|
||||
public static Scene Scene(this Entity entity)
|
||||
{
|
||||
return entity.IScene as Scene;
|
||||
}
|
||||
|
||||
public static T Scene<T>(this Entity entity) where T: class, IScene
|
||||
{
|
||||
return entity.IScene as T;
|
||||
}
|
||||
|
||||
public static Scene Root(this Entity entity)
|
||||
{
|
||||
return entity.IScene.Fiber.Root;
|
||||
}
|
||||
|
||||
public static Fiber Fiber(this Entity entity)
|
||||
{
|
||||
return entity.IScene.Fiber;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user