2021-04-08 20:09:59 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace ET
|
|
|
|
|
{
|
|
|
|
|
public static class SceneHelper
|
|
|
|
|
{
|
|
|
|
|
public static int DomainZone(this Entity entity)
|
|
|
|
|
{
|
|
|
|
|
return entity.DomainScene()?.Zone ?? 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Scene DomainScene(this Entity entity)
|
|
|
|
|
{
|
2022-05-29 23:02:28 +08:00
|
|
|
|
if (entity == null)
|
|
|
|
|
return null;
|
2021-04-08 20:09:59 +08:00
|
|
|
|
return (Scene)entity.Domain;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|