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