1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

feat(WorldManager): 添加isRelease方法判断发布版本

将OS.is_debug_build()检查封装到WorldManager中,便于统一管理发布版本判断逻辑。EntityBase.gd中使用新方法替代直接调用。
This commit is contained in:
2025-12-14 14:44:58 +08:00
parent ba1be5fb5e
commit a9f3186b5a
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ func _ready():
if isPlayer():
if displayName == MultiplayerState.playerName:
UIState.player = self
if !OS.is_debug_build():
if WorldManager.isRelease():
for i in weaponStore.get_children():
i.free()
weaponStore.add_child(ComponentManager.getWeapon("PurpleCrystal").instantiate())
+2
View File
@@ -42,3 +42,5 @@ static func getTime():
return runningTime
static func spawnNode(node: Node):
rootNode.spawn(node)
static func isRelease() -> bool:
return !OS.is_debug_build()