namespace Base
{
///
/// 游戏和扩展编辑器都需要用到的数据放在这个Scene上面
///
public sealed class Share
{
private static Entity share;
public static Entity Scene
{
get
{
if (share == null)
{
share = new Entity();
share.AddComponent();
share.AddComponent();
share.AddComponent();
GlobalConfigComponent globalConfigComponent = share.AddComponent();
share.AddComponent(globalConfigComponent.GlobalProto.Protocol);
}
return share;
}
}
public static void Close()
{
Entity scene = share;
share = null;
scene?.Dispose();
}
}
}