From e7a4150495c8971b197074135c5f5cd5d1be4e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=80=9D=E6=B5=B7?= <1464576565@qq.com> Date: Mon, 20 Apr 2026 13:57:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96Service=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/ABase/Base/Service/Core/AppServices.cs | 3 --- Runtime/ABase/Base/Service/Core/ServiceContext.cs | 3 --- Runtime/ABase/Base/Service/Core/ServiceWorld.cs | 4 +--- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Runtime/ABase/Base/Service/Core/AppServices.cs b/Runtime/ABase/Base/Service/Core/AppServices.cs index b6ed168..1fa9873 100644 --- a/Runtime/ABase/Base/Service/Core/AppServices.cs +++ b/Runtime/ABase/Base/Service/Core/AppServices.cs @@ -7,9 +7,6 @@ namespace AlicizaX private static ServiceWorld _world; public static bool HasWorld => _world != null; - public static bool HasScene => _world is { HasScene: true }; - public static bool HasGameplay => _world is { HasGameplay: true }; - internal static ServiceWorld EnsureWorld(int appScopeOrder = ServiceDomainOrder.App) { if (_world == null) diff --git a/Runtime/ABase/Base/Service/Core/ServiceContext.cs b/Runtime/ABase/Base/Service/Core/ServiceContext.cs index f7253a2..6ea05a2 100644 --- a/Runtime/ABase/Base/Service/Core/ServiceContext.cs +++ b/Runtime/ABase/Base/Service/Core/ServiceContext.cs @@ -12,9 +12,6 @@ namespace AlicizaX internal ServiceScope Scope { get; } - public bool HasScene => World.HasScene; - - public bool HasGameplay => World.HasGameplay; public T Require() where T : class, IService => World.Require(Scope); diff --git a/Runtime/ABase/Base/Service/Core/ServiceWorld.cs b/Runtime/ABase/Base/Service/Core/ServiceWorld.cs index 214552d..68c017f 100644 --- a/Runtime/ABase/Base/Service/Core/ServiceWorld.cs +++ b/Runtime/ABase/Base/Service/Core/ServiceWorld.cs @@ -15,13 +15,11 @@ namespace AlicizaX internal ServiceWorld(int appScopeOrder = ServiceDomainOrder.App) { - App = CreateScopeInternal(typeof(AppScope), nameof(AppScope), appScopeOrder); + App = CreateScopeInternal(typeof(AppScope), nameof(App), appScopeOrder); } internal ServiceScope App { get; } - internal ServiceScope AppScope => App; - internal bool HasScene => _sceneScope != null && !_sceneScope.IsDisposed; internal bool HasGameplay => _gameplayScope != null && !_gameplayScope.IsDisposed;