优化 release_stage 加载机制
This commit is contained in:
parent
e546aa2d95
commit
c1362ebc06
@ -9,6 +9,10 @@ var archive: AssembledArchive:
|
|||||||
if archive:
|
if archive:
|
||||||
GlobalConfigManager.print_global_info()
|
GlobalConfigManager.print_global_info()
|
||||||
print("use archive ", archive.resource_path)
|
print("use archive ", archive.resource_path)
|
||||||
|
archive.event_stage["release_stage"] = GlobalConfig.RELEASE_STAGE
|
||||||
|
print_rich("[color=brown] release_stage = %s[/color]" % GlobalConfig.RELEASE_STAGE)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# current archive
|
# current archive
|
||||||
static var user_root_dir := "user://data/" # must end with "/"
|
static var user_root_dir := "user://data/" # must end with "/"
|
||||||
|
@ -77,6 +77,8 @@ func _ready() -> void:
|
|||||||
printerr("[EventBinder] bind_enable is true but parent is null. path: %s" % get_path())
|
printerr("[EventBinder] bind_enable is true but parent is null. path: %s" % get_path())
|
||||||
return
|
return
|
||||||
_local_updater_event_stage = EventManager.get_stage(updater_event)
|
_local_updater_event_stage = EventManager.get_stage(updater_event)
|
||||||
|
if GlobalConfig.DEBUG:
|
||||||
|
print(updater_event, " updater stage:", _local_updater_event_stage)
|
||||||
_update_binding_state(_local_updater_event_stage)
|
_update_binding_state(_local_updater_event_stage)
|
||||||
EventManager.stage_updated.connect(_on_global_stage_updated)
|
EventManager.stage_updated.connect(_on_global_stage_updated)
|
||||||
if not trigger_event.is_empty():
|
if not trigger_event.is_empty():
|
||||||
|
@ -4,14 +4,6 @@ extends Node
|
|||||||
signal stage_updated(event_name: StringName, stage: int)
|
signal stage_updated(event_name: StringName, stage: int)
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
|
||||||
if Engine.is_editor_hint():
|
|
||||||
return
|
|
||||||
# 0demo 1release
|
|
||||||
set_stage("release_stage", GlobalConfig.RELEASE_STAGE)
|
|
||||||
print_rich("[color=brown] release_stage = %s[/color]" % GlobalConfig.RELEASE_STAGE)
|
|
||||||
|
|
||||||
|
|
||||||
func get_chapter_stage() -> int:
|
func get_chapter_stage() -> int:
|
||||||
return get_stage("current_chapter_stage")
|
return get_stage("current_chapter_stage")
|
||||||
|
|
||||||
|
@ -147,10 +147,9 @@ packed_scene = ExtResource("7_d27sg")
|
|||||||
|
|
||||||
[node name="EventBinder" type="Node" parent="Ground/DeployLayer/Event2D放肉后/CloseupDemo公告"]
|
[node name="EventBinder" type="Node" parent="Ground/DeployLayer/Event2D放肉后/CloseupDemo公告"]
|
||||||
script = ExtResource("6_yaa68")
|
script = ExtResource("6_yaa68")
|
||||||
memo = "release_stage=[0:demo] 时,显示: [公告]
|
memo = "release_stage=[0:demo] 时,启用: [公告]
|
||||||
"
|
"
|
||||||
updater_event = &"release_stage"
|
updater_event = &"release_stage"
|
||||||
updater_mode = "shower"
|
|
||||||
updater_stages = Array[int]([0])
|
updater_stages = Array[int]([0])
|
||||||
metadata/_custom_type_script = "uid://0wjaho6qkg6s"
|
metadata/_custom_type_script = "uid://0wjaho6qkg6s"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user