mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-07-11 12:32:54 +08:00
feat(WorldManager): 添加isRelease方法判断发布版本
将OS.is_debug_build()检查封装到WorldManager中,便于统一管理发布版本判断逻辑。EntityBase.gd中使用新方法替代直接调用。
This commit is contained in:
@@ -122,7 +122,7 @@ func _ready():
|
|||||||
if isPlayer():
|
if isPlayer():
|
||||||
if displayName == MultiplayerState.playerName:
|
if displayName == MultiplayerState.playerName:
|
||||||
UIState.player = self
|
UIState.player = self
|
||||||
if !OS.is_debug_build():
|
if WorldManager.isRelease():
|
||||||
for i in weaponStore.get_children():
|
for i in weaponStore.get_children():
|
||||||
i.free()
|
i.free()
|
||||||
weaponStore.add_child(ComponentManager.getWeapon("PurpleCrystal").instantiate())
|
weaponStore.add_child(ComponentManager.getWeapon("PurpleCrystal").instantiate())
|
||||||
|
|||||||
@@ -42,3 +42,5 @@ static func getTime():
|
|||||||
return runningTime
|
return runningTime
|
||||||
static func spawnNode(node: Node):
|
static func spawnNode(node: Node):
|
||||||
rootNode.spawn(node)
|
rootNode.spawn(node)
|
||||||
|
static func isRelease() -> bool:
|
||||||
|
return !OS.is_debug_build()
|
||||||
|
|||||||
Reference in New Issue
Block a user