From bcc4202eb97829a16d7113d6511aa4fba0a62168 Mon Sep 17 00:00:00 2001 From: cakipaul Date: Sat, 5 Jul 2025 18:44:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E5=A4=84=20oneshot=5Fanimation;=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96debug=20archive=E4=BD=8D=E7=BD=AE=EF=BC=88?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=EF=BC=8C=E4=B8=8D=E5=AD=98=E5=9C=A8=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E4=B8=AD=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 +- README.md | 5 - .../pro_animated_sprite.gd | 8 +- asset/dialogue/event_stage.dialogue | 2 +- scene/entity/ambush.gd | 1 + scene/ground/scene/animation_root.gd | 157 +++++++++++------- scene/ground/scene/c01/s05_院长房间.gd | 2 +- scene/ground/scene/c01/s05_院长房间.tscn | 20 --- .../ground/scene/c01/s06_孤儿院长廊围墙.tscn | 57 ------- scene/ground/scene/c01/s07_书店外.tscn | 25 --- scene/ground/scene/c01/s08_书店.tscn | 69 ++------ scene/ground/scene/c01/s09_公寓楼外.tscn | 1 - scene/ground/scene/c01/s10_公寓楼道.tscn | 4 - scene/ground/scene/c01/s11_黄包车演出.tscn | 4 - scene/ground/scene/c01/s12_书店外_诡异版.tscn | 27 --- scene/ground/scene/c02/s01_公寓门口.tscn | 8 - scene/ground/scene/c02/s02_过道.tscn | 58 ------- scene/ground/scene/c02/s03_院子.gd | 8 +- scene/ground/scene/c02/s03_院子.tscn | 88 +--------- scene/ground/scene/c02/s04_保卫科.tscn | 37 ----- scene/ground/scene/c02/s05_一楼内侧楼道.gd | 4 +- scene/ground/scene/c02/s05_一楼内侧楼道.tscn | 52 +----- scene/ground/scene/c02/s06_二楼.tscn | 49 ------ scene/ground/scene/c02/s07_二楼内侧楼道.tscn | 27 --- scene/ground/scene/c02/s08_瞎子卧室.tscn | 33 ---- scene/ground/scene/c02/s09_裂缝.tscn | 18 -- scene/ground/scene/c02/s10_空房间.tscn | 52 ------ scene/ground/scene/c02/s11_一楼火灾.tscn | 8 +- scene/ground/scene/c02/s12_盒子猫.tscn | 11 -- scene/ground/scene/c02/s13_盒子猫二楼.tscn | 8 +- .../ground/scene/c02/s14_盒子猫二楼内侧.tscn | 8 +- .../ground/scene/c02/s15_盒子猫一楼内侧.tscn | 8 +- .../ground/scene/c02/s16_盒子猫三楼内侧.tscn | 8 +- scene/ground/scene/c02/s17_盒子猫三楼.tscn | 8 +- scene/ground/scene/c02/s18_盒子猫一楼.tscn | 8 +- scene/ground/scene/c03/s01_三楼.tscn | 19 --- scene/ground/scene/c03/s02_三楼内侧.tscn | 11 +- ...02_瞎子理发店.tscn => s03_瞎子理发店.tscn} | 32 ++-- scene/ground/scene/debug_archive.txt | 46 +++++ scene/ground/scene/template_scene.tscn | 10 +- 40 files changed, 263 insertions(+), 743 deletions(-) rename scene/ground/scene/c03/{s02_瞎子理发店.tscn => s03_瞎子理发店.tscn} (85%) create mode 100644 scene/ground/scene/debug_archive.txt diff --git a/.gitignore b/.gitignore index 69969460..e40057f4 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,7 @@ /.mono/ /data_*/ mono_crash.*.json -mono_crash.*.blob \ No newline at end of file +mono_crash.*.blob + +# misc +*.log \ No newline at end of file diff --git a/README.md b/README.md index ec04f08a..0acac436 100644 --- a/README.md +++ b/README.md @@ -52,11 +52,6 @@ GroundLoader 加载/切换 Ground 时,分为上下两段转场: #### AnimationPlayer:每个 Ground 都有一个 AnimationPlayer,脚本继承自定义的 AnimationRoot -主要功能说明: - -1. 正常的 AnimationPlayer 功能 -2. oneshot_animation 场景首次加载时播放的 animation - 主要方法与数据说明: 1. _default_data() : 本场景的默认存档数据 diff --git a/addons/property-inspector/pro_animation_sprite2d/pro_animated_sprite.gd b/addons/property-inspector/pro_animation_sprite2d/pro_animated_sprite.gd index df820a7d..417b3af2 100644 --- a/addons/property-inspector/pro_animation_sprite2d/pro_animated_sprite.gd +++ b/addons/property-inspector/pro_animation_sprite2d/pro_animated_sprite.gd @@ -65,14 +65,14 @@ func _ready() -> void: add_child(light2d) frame_changed.connect(_on_frame_changed) _load_config() - if autostart and animation and not Engine.is_editor_hint(): + if not Engine.is_editor_hint() and (autostart or autoplay) and animation: # 制造一点错差 frame = randi() % sprite_frames.get_frame_count(animation) - play() animation_changed.connect(_on_animation_start) animation_looped.connect(_on_animation_start) animation_finished.connect(_on_animation_finished) animation_looped.connect(_on_animation_finished) + # 处理 debug_mov_onion_sprite2d if Engine.is_editor_hint(): # stop() # frame = 0 @@ -80,6 +80,10 @@ func _ready() -> void: _debug_mov_projection() else: debug_mov_onion_sprite2d.queue_free() + # autoplay 会自己 play, 只有自定义的 autostart 手动调用 play + if not Engine.is_editor_hint() and autostart: + play() + func _debug_mov_projection(): _load_config() diff --git a/asset/dialogue/event_stage.dialogue b/asset/dialogue/event_stage.dialogue index 789348ef..b2ccfdf7 100644 --- a/asset/dialogue/event_stage.dialogue +++ b/asset/dialogue/event_stage.dialogue @@ -2,7 +2,7 @@ # 0:关闭 1:打开 2:放入小蝉人偶 3:全部放置正确_可摇手柄 4:已播放完成 c02_musicbox_stage # 1:已交互疯子 2:小鞋已掉落 -c02_madman_interacted +c02_madman_interacted_stage # 0:默认 1:寻找弹珠_老虎钳可以换弹珠 2:给出弹珠 3:游戏结束_小猫纸片 4:游戏结束_小猫离开 c02_ball_game_stage => END diff --git a/scene/entity/ambush.gd b/scene/entity/ambush.gd index b1d22c4b..713335e4 100644 --- a/scene/entity/ambush.gd +++ b/scene/entity/ambush.gd @@ -163,6 +163,7 @@ func _area_entered(_area = null): func _do_trigger(): var time = Time.get_ticks_msec() + var has_triggered = false # 确保只有一个线程进入该逻辑,因为有时 player 碰撞和首次进入 tree 都会触发该方法 if not trigger_mutex.try_lock(): print("Ambush trigger mutex lock fail, name=", name) diff --git a/scene/ground/scene/animation_root.gd b/scene/ground/scene/animation_root.gd index 011e504d..dbdff996 100644 --- a/scene/ground/scene/animation_root.gd +++ b/scene/ground/scene/animation_root.gd @@ -9,21 +9,11 @@ var dialogue_c04 := preload("res://asset/dialogue/c04.dialogue") as DialogueReso var dialogue_c05 := preload("res://asset/dialogue/c05.dialogue") as DialogueResource var dialogue_c06 := preload("res://asset/dialogue/c06.dialogue") as DialogueResource -@export var data = { - # 首次进入场景时触发 - "oneshot_animation_played": false -} -@export_tool_button("reset 存档") var reset_archive = _reset_archive -# event 也混合其中 -@export var debug_global_data: Dictionary[String, Variant] = { - "enabled_items": {}, - "player_x": 30.0, -} -@export var debug_ground_data: Dictionary[String, Variant] = {} - +@export var data = {} @export var auto_reset_on_debug_restarting := false @export_tool_button("auto reference") var auto_ref = _auto_setup_node_reference -var oneshot_animation := "" +@export_tool_button("reset 存档") var reset_archive = _reset_archive + var ground_archive: GroundArchive var ground: Ground2D @@ -35,6 +25,7 @@ func _default_data() -> Dictionary: func _ready() -> void: + _set_up_debug_tool() ground = get_node("..") if not ground: printerr("ground not found") @@ -45,12 +36,10 @@ func _ready() -> void: _reset_archive() print("restarting: skip animation root _ready()") return - data.merge(_default_data(), true) if Engine.is_editor_hint(): - # notify_property_list_changed() - # 更新 oneshot_animation 的可选项 - animation_libraries_updated.connect(notify_property_list_changed) + data = {} return + data.merge(_default_data(), true) ground_archive = ArchiveManager.archive.ground_archive() as GroundArchive var archive_data = ground_archive.get_data(name) # merge data @@ -64,7 +53,6 @@ func _ready() -> void: else: _setup_node_reference() _on_ground_ready() - ready.connect(_on_ready) func _setup_node_reference() -> void: @@ -75,19 +63,6 @@ func _on_ground_ready() -> void: pass -func _on_ready() -> void: - if Engine.is_editor_hint(): - return - # 仅在首次进入场景时触发 - if oneshot_animation: - if not data.get("oneshot_animation_played"): - play(oneshot_animation) - animation_finished.connect(_oneshot_animation_finished, CONNECT_ONE_SHOT) - else: - if GlobalConfig.DEBUG: - print("oneshot_animation_played:", oneshot_animation) - - func _oneshot_animation_finished(animation_name) -> void: if GlobalConfig.DEBUG: print("oneshot_animation_finished:", animation_name) @@ -113,33 +88,85 @@ func get_global_value(property: StringName, default_value = null) -> Variant: return val +###### TOOL BUTTON +var archive_str_path = "res://scene/ground/scene/debug_archive.txt" + + +func _set_up_debug_tool() -> void: + if not Engine.is_editor_hint(): + return + var var_str = FileAccess.get_file_as_string(archive_str_path) + var archive_var = str_to_var(var_str) + if not archive_var is Dictionary: + archive_var = {} + debug_archive_dict = archive_var.get_or_add(_get_data_key(), {}) + notify_property_list_changed() + + +func _get_data_key() -> String: + return get_script().resource_path.split("/ground/scene/")[1].get_basename().replace("/", "_") + + +func _save_debug_archive_json() -> void: + if not Engine.is_editor_hint(): + return + var var_str = FileAccess.get_file_as_string(archive_str_path) + var archive_var = str_to_var(var_str) + if not archive_var is Dictionary: + archive_var = {} + archive_var[_get_data_key()] = debug_archive_dict + var file = FileAccess.open(archive_str_path, FileAccess.WRITE) + file.store_string(var_to_str(archive_var)) + file.close() + + +var debug_archive_dict = {} + + +func _get_property_list() -> Array[Dictionary]: + if not Engine.is_editor_hint(): + return [] + return [ + { + "name": "debug_global_data", + "type": TYPE_DICTIONARY, + # 不保存 + "usage": PROPERTY_USAGE_EDITOR, + }, + { + "name": "debug_ground_data", + "type": TYPE_DICTIONARY, + # 不保存 + "usage": PROPERTY_USAGE_EDITOR, + }, + ] + + func _get(property: StringName) -> Variant: - if property == "oneshot_animation": - return oneshot_animation + if not Engine.is_editor_hint(): + return null + if property == "debug_global_data": + return debug_archive_dict.get_or_add("global", {}) + elif property == "debug_ground_data": + return debug_archive_dict.get_or_add("ground", {}) return null func _set(property: StringName, value: Variant) -> bool: - if property == "oneshot_animation": - oneshot_animation = value + if not Engine.is_editor_hint(): + return false + if property == "debug_global_data": + debug_archive_dict["global"] = value + return true + elif property == "debug_ground_data": + debug_archive_dict["ground"] = value return true return false -func _get_property_list() -> Array[Dictionary]: - return [ - { - "name": "oneshot_animation", - "type": TYPE_STRING, - "hint": PROPERTY_HINT_ENUM_SUGGESTION, - "hint_string": ",".join(get_animation_list()), - } - ] - - -###### TOOL BUTTON - func _reset_archive() -> void: + var debug_global_data = get("debug_global_data") + var debug_ground_data = get("debug_ground_data") ground = get_tree().edited_scene_root.get_node("Ground") if not ground: printerr("ground not found") @@ -174,7 +201,7 @@ func _reset_archive() -> void: if not archive.ground_archives.has(ground.scene_name): archive.ground_archives[ground.scene_name] = GroundArchive.new() archive.ground_archives[ground.scene_name].scene_name = ground.scene_name - # setup + # setup _setup_ground_data(debug_ground_data, ground) archive.ground_archives[ground.scene_name].data = debug_ground_data # 重置 event 状态 @@ -212,8 +239,12 @@ func _reset_archive() -> void: if props == null or not props is Dictionary: props = {} debug_global_data["enabled_items"] = props - var prop_disabler_regx = RegEx.create_from_string(r'SceneManager.disable_prop_item\(.?"(.+)"') as RegEx - var prop_enabler_regx = RegEx.create_from_string(r'EventMSceneManageranager.enable_prop_item\(.?"(.+)"') as RegEx + var prop_disabler_regx = ( + RegEx.create_from_string(r'SceneManager.disable_prop_item\(.?"(.+)"') as RegEx + ) + var prop_enabler_regx = ( + RegEx.create_from_string(r'EventMSceneManageranager.enable_prop_item\(.?"(.+)"') as RegEx + ) for p_match in prop_disabler_regx.search_all(code): var key = p_match.get_string(1) if not props.has(key): @@ -240,6 +271,7 @@ func _reset_archive() -> void: # 重置其他全局变量 archive.player_global_position_x = debug_global_data.get_or_add("player_x", 30.0) print("reset archive data success") + _save_debug_archive_json() ResourceSaver.save(archive) notify_property_list_changed() @@ -285,6 +317,7 @@ func _find_event(events: Dictionary, node: Node) -> void: print("Find updater_event: " + child.updater_event) _find_event(events, child) + func _find_props(props: Dictionary, node: Node) -> void: if not node: return @@ -309,6 +342,8 @@ func _find_props(props: Dictionary, node: Node) -> void: var func_line_id := -1 var region_start_id := -1 var region_end_id := -1 + + # #region node_reference # #endregion # # 读取设置变量名 @@ -343,7 +378,9 @@ func _auto_setup_node_reference(): region_end_id = region_start_id + 1 code_lines.insert(region_end_id, "#endregion") func_line_id += 1 - print("auto reference start, region_start_id=", region_start_id, " region_end_id=", region_end_id) + print( + "auto reference start, region_start_id=", region_start_id, " region_end_id=", region_end_id + ) var existing_vars = _read_existing_vars(code_lines) var created_vars = [] _traverse_nodes(get_node(".."), get_node(".."), existing_vars, code_lines, created_vars) @@ -353,7 +390,7 @@ func _auto_setup_node_reference(): print_rich("skipped existing_vars:[color=cyan]", existing_vars.size(), existing_vars) print_rich("created_vars:[color=green]", created_vars.size(), created_vars) - + func _read_existing_vars(code_lines: PackedStringArray) -> Dictionary: var existing_vars = {} for i in range(region_start_id + 1, region_end_id): @@ -365,26 +402,30 @@ func _read_existing_vars(code_lines: PackedStringArray) -> Dictionary: return existing_vars -func _traverse_nodes(ground_node, node: Node, existing_vars: Dictionary, code_lines: PackedStringArray, created_vars): +func _traverse_nodes( + ground_node, node: Node, existing_vars: Dictionary, code_lines: PackedStringArray, created_vars +): if node: _parse_node(ground_node, node, existing_vars, code_lines, created_vars) for child in node.get_children(): _traverse_nodes(ground_node, child, existing_vars, code_lines, created_vars) -func _parse_node(ground_node, node:Node, existing_vars:Dictionary, code_lines:PackedStringArray, created_vars): +func _parse_node( + ground_node, node: Node, existing_vars: Dictionary, code_lines: PackedStringArray, created_vars +): # 0. filter unique mark # 1. create `var snake_case_variable_name = $"../xx/yy/NodeName"` # 2. create `var snake_case_variable_name = $"../xx/yy/NodeName"` - if not node.unique_name_in_owner or ground_node.get_node_or_null("%"+node.name) == null: + if not node.unique_name_in_owner or ground_node.get_node_or_null("%" + node.name) == null: # 只读取 unique 标记过的节点; node.unique_name_in_owner 参数不可靠,需要实际检查 return var var_name = node.name.to_snake_case() if existing_vars.has(var_name): return created_vars.append(var_name) - code_lines.insert(region_start_id + 1, "var " + var_name + ": "+ str(node.get_class())) + code_lines.insert(region_start_id + 1, "var " + var_name + ": " + str(node.get_class())) func_line_id += 1 var path = self.get_path_to(node).get_concatenated_names() # closeup花名册 = $"../DeployLayer/Closeup花名册" - code_lines.insert(func_line_id + 1, "\t" + var_name +" = $\"" + path +"\"") + code_lines.insert(func_line_id + 1, "\t" + var_name + ' = $"' + path + '"') diff --git a/scene/ground/scene/c01/s05_院长房间.gd b/scene/ground/scene/c01/s05_院长房间.gd index 23a94094..3608089b 100644 --- a/scene/ground/scene/c01/s05_院长房间.gd +++ b/scene/ground/scene/c01/s05_院长房间.gd @@ -40,7 +40,7 @@ func _on_ground_ready() -> void: paper = $"../DeployLayer/oneshot纸片" right_door = $"../DeployLayer/portal_right" piano = $"../DeployLayer/钢琴" - if data["oneshot_animation_played"]: + if data["intro_played"]: $"../DeployLayer/床".enabled = true Util.timer(1.0, show_interact_help) # 画框是否已经正位 diff --git a/scene/ground/scene/c01/s05_院长房间.tscn b/scene/ground/scene/c01/s05_院长房间.tscn index cc256201..ab53d83f 100644 --- a/scene/ground/scene/c01/s05_院长房间.tscn +++ b/scene/ground/scene/c01/s05_院长房间.tscn @@ -642,26 +642,6 @@ libraries = { &"": SubResource("AnimationLibrary_ifimj") } script = ExtResource("2_j5oim") -data = { -"frame_relocated": false, -"oneshot_animation_played": false -} -debug_ground_data = Dictionary[String, Variant]({ -"AnimationPlayer": { -"frame_relocated": false, -"oneshot_animation_played": true -}, -"ambush鸡毛掸子": { -"played": false -}, -"oneshot纸片": { -"interacted_times": 0 -}, -"钢琴": { -"interacted_times": 0 -} -}) -oneshot_animation = "" [node name="intro_audio_player" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"] stream = ExtResource("3_sluu3") diff --git a/scene/ground/scene/c01/s06_孤儿院长廊围墙.tscn b/scene/ground/scene/c01/s06_孤儿院长廊围墙.tscn index b4192ed9..ee0b25f6 100644 --- a/scene/ground/scene/c01/s06_孤儿院长廊围墙.tscn +++ b/scene/ground/scene/c01/s06_孤儿院长廊围墙.tscn @@ -150,61 +150,8 @@ libraries = { &"": SubResource("AnimationLibrary_fq7pt") } script = ExtResource("2_fkfhi") -debug_global_data = Dictionary[String, Variant]({ -"enabled_items": {}, -"player_x": 1500.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"AnimationPlayer": { -"oneshot_animation_played": false -}, -"Interactable桌椅": { -"interacted_times": 0 -}, -"四小孩画鬼差的对话ambush": { -"played": false -}, -"对话1ambush": { -"played": false -}, -"对话2ambush": { -"played": false -}, -"对话3ambush": { -"played": false -}, -"桌椅ambush1": { -"played": false -}, -"桌椅ambush2": { -"played": false -}, -"桌椅ambush3": { -"played": false -}, -"猫鼠游戏失败ambush": { -"played": false -}, -"猫鼠游戏开始ambush": { -"played": false -}, -"猫鼠游戏胜利ambush": { -"played": false -}, -"猫鼠游戏重置ambush": { -"played": false -}, -"门口ambush": { -"played": false -}, -"门口对话ambush": { -"played": false -} -}) -oneshot_animation = "" [node name="桌椅撞倒音效" type="AudioStreamPlayer2D" parent="Ground/AnimationPlayer" index="0"] -process_mode = 1 position = Vector2(2750, 56) stream = ExtResource("3_lgina") volume_db = -2.971 @@ -214,7 +161,6 @@ script = ExtResource("4_qq2uh") metadata/_custom_type_script = "uid://wapo47a1oddf" [node name="走廊Sfx2d" type="AudioStreamPlayer2D" parent="Ground/AnimationPlayer" index="1"] -process_mode = 1 position = Vector2(490, 36) stream = ExtResource("5_6mww0") autoplay = true @@ -295,7 +241,6 @@ animation = &"秋千" frame = 4 [node name="Sfx2D" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/秋千"] -process_mode = 1 stream = ExtResource("12_huyl5") autoplay = true max_distance = 300.0 @@ -305,7 +250,6 @@ loop = true metadata/_custom_type_script = "uid://wapo47a1oddf" [node name="Sfx2D童谣" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/秋千"] -process_mode = 1 position = Vector2(1, 7) stream = ExtResource("15_qq2uh") volume_db = -15.0 @@ -325,7 +269,6 @@ autoplay = "跷跷板" frame = 4 [node name="Sfx2D" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/跷跷板"] -process_mode = 1 position = Vector2(-117, -1) stream = ExtResource("13_phmvd") autoplay = true diff --git a/scene/ground/scene/c01/s07_书店外.tscn b/scene/ground/scene/c01/s07_书店外.tscn index 3411bb63..854d4480 100644 --- a/scene/ground/scene/c01/s07_书店外.tscn +++ b/scene/ground/scene/c01/s07_书店外.tscn @@ -67,30 +67,6 @@ player_y = 55 [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_dhaq4") -data = { -"fog_disappeared": false, -"oneshot_animation_played": false -} -debug_global_data = Dictionary[String, Variant]({ -"enabled_items": {}, -"player_x": 2000.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"Ambush报童": { -"played": false -}, -"Ambush监督小孩": { -"played": false -}, -"Ambush陆仁收刀": { -"played": false -}, -"AnimationPlayer": { -"fog_disappeared": false, -"oneshot_animation_played": false -} -}) -oneshot_animation = "" [node name="环境音" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"] stream = ExtResource("3_na2nu") @@ -206,7 +182,6 @@ action_configs = Array[Dictionary]([{ }]) [node name="Sfx2D" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/陆仁舞刀"] -process_mode = 1 stream = ExtResource("14_c7jb6") volume_db = -2.0 autoplay = true diff --git a/scene/ground/scene/c01/s08_书店.tscn b/scene/ground/scene/c01/s08_书店.tscn index 7d05f6d7..2c3e8e62 100644 --- a/scene/ground/scene/c01/s08_书店.tscn +++ b/scene/ground/scene/c01/s08_书店.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=22 format=3 uid="uid://cwu4dhayra8pg"] +[gd_scene load_steps=21 format=3 uid="uid://cwu4dhayra8pg"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_b3cca"] [ext_resource type="Script" uid="uid://6q2pfbqsw10t" path="res://scene/ground/scene/c01/s08_书店.gd" id="2_0lque"] @@ -18,27 +18,7 @@ [ext_resource type="AudioStream" uid="uid://cniawn37n8888" path="res://asset/audio/sfx/交互/序章/04_书店内_递交报纸.wav" id="9_lfr41"] [ext_resource type="Texture2D" uid="uid://bp4y3vujvsl7r" path="res://asset/art/scene/c01/s08_书店/fg_前景.png" id="10_4e3a1"] -[sub_resource type="Animation" id="Animation_5koky"] -resource_name = "one_shot" -tracks/0/type = "method" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("AnimationPlayer") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"values": [{ -"args": [], -"method": &"first_enter_door" -}] -} - [sub_resource type="AnimationLibrary" id="AnimationLibrary_xqgjo"] -_data = { -&"one_shot": SubResource("Animation_5koky") -} [sub_resource type="ShaderMaterial" id="ShaderMaterial_ddd5v"] @@ -58,32 +38,6 @@ libraries = { &"": SubResource("AnimationLibrary_xqgjo") } script = ExtResource("2_0lque") -debug_global_data = Dictionary[String, Variant]({ -"c01_shelf_game_success": false, -"enabled_items": { -"prop_信碎片1": true -}, -"envelope_game_success": false, -"player_x": 30.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"Ambush梯子": { -"played": false -}, -"Ambush银元": { -"played": false -}, -"AnimationPlayer": { -"oneshot_animation_played": false -}, -"Interactable信件书桌": { -"interacted_times": 0 -}, -"Interactable报纸柜台": { -"interacted_times": 0 -} -}) -oneshot_animation = "one_shot" [node name="环境音" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"] stream = ExtResource("3_0x288") @@ -145,7 +99,12 @@ holding_reason_key = "c01_s08_书店工作" position = Vector2(593, 20) target_scene = "c01_s07" -[node name="Ambush梯子" parent="Ground/DeployLayer" index="2" instance=ExtResource("4_c4lg5")] +[node name="Ambush首次进店" parent="Ground/DeployLayer" index="2" instance=ExtResource("4_c4lg5")] +position = Vector2(-72, 39) +on_ground_ready = true +hook_method = "first_enter_door" + +[node name="Ambush梯子" parent="Ground/DeployLayer" index="3" instance=ExtResource("4_c4lg5")] position = Vector2(431, 18) texture = ExtResource("5_tnrke") trigger_mode = "interact" @@ -153,14 +112,14 @@ one_shot = false cooldown_time = 1.0 hook_method = "play_shelf_game" -[node name="Interactable信件书桌" parent="Ground/DeployLayer" index="3" instance=ExtResource("7_fue0t")] +[node name="Interactable信件书桌" parent="Ground/DeployLayer" index="4" instance=ExtResource("7_fue0t")] position = Vector2(227, 55) one_shot = false disable_prop_after_interacted = true prop_key = "prop_信碎片1" prop_key2 = "prop_信碎片2" -[node name="Mask" type="ColorRect" parent="Ground/DeployLayer" index="4"] +[node name="Mask" type="ColorRect" parent="Ground/DeployLayer" index="5"] z_index = 10 custom_minimum_size = Vector2(700, 350) anchors_preset = 15 @@ -175,12 +134,12 @@ grow_vertical = 2 mouse_filter = 2 color = Color(0, 0, 0, 0) -[node name="自动跟随的老鼠" parent="Ground/DeployLayer" index="5" instance=ExtResource("6_05do1")] +[node name="自动跟随的老鼠" parent="Ground/DeployLayer" index="6" instance=ExtResource("6_05do1")] position = Vector2(-8, 88) action_area = Vector2(600, 32) scatter_on_start = true -[node name="Interactable报纸柜台" parent="Ground/DeployLayer" index="6" instance=ExtResource("7_fue0t")] +[node name="Interactable报纸柜台" parent="Ground/DeployLayer" index="7" instance=ExtResource("7_fue0t")] position = Vector2(135, 49) [node name="SfxSuccess" parent="Ground/DeployLayer/Interactable报纸柜台" index="1"] @@ -189,14 +148,14 @@ stream = null [node name="CollisionShape2D" parent="Ground/DeployLayer/Interactable报纸柜台/Area2D" index="0"] shape = SubResource("RectangleShape2D_0x288") -[node name="Ambush银元" parent="Ground/DeployLayer" index="7" instance=ExtResource("4_c4lg5")] +[node name="Ambush银元" parent="Ground/DeployLayer" index="8" instance=ExtResource("4_c4lg5")] position = Vector2(537, 21) enabled = false trigger_mode = "interact" cooldown_time = 1.0 hook_method = "pay_off_wage" -[node name="老板" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="8"] +[node name="老板" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="9"] position = Vector2(151, -2) sprite_frames = ExtResource("8_hunwx") animation = &"老板写字" @@ -204,7 +163,7 @@ autoplay = "老板写字" frame = 3 frame_progress = 0.119486 -[node name="小小蝶坠落" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="9"] +[node name="小小蝶坠落" type="AnimatedSprite2D" parent="Ground/DeployLayer" index="10"] visible = false position = Vector2(427, 1) sprite_frames = ExtResource("8_hunwx") diff --git a/scene/ground/scene/c01/s09_公寓楼外.tscn b/scene/ground/scene/c01/s09_公寓楼外.tscn index 3507b173..f7b0d0c0 100644 --- a/scene/ground/scene/c01/s09_公寓楼外.tscn +++ b/scene/ground/scene/c01/s09_公寓楼外.tscn @@ -69,7 +69,6 @@ player_y = 55 [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_u053j") -oneshot_animation = "" [node name="花枯萎音效" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"] stream = ExtResource("3_b5sdk") diff --git a/scene/ground/scene/c01/s10_公寓楼道.tscn b/scene/ground/scene/c01/s10_公寓楼道.tscn index d8195917..fe0e41e7 100644 --- a/scene/ground/scene/c01/s10_公寓楼道.tscn +++ b/scene/ground/scene/c01/s10_公寓楼道.tscn @@ -18,10 +18,6 @@ scene_name = "c01_s10" [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_4kx83") -debug_global_data = Dictionary[String, Variant]({ -"enabled_items": ["prop_火柴", "prop_院长的信", "prop_银元"] -}) -oneshot_animation = "" [node name="背景音效" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"] stream = ExtResource("3_6prdo") diff --git a/scene/ground/scene/c01/s11_黄包车演出.tscn b/scene/ground/scene/c01/s11_黄包车演出.tscn index 6bf3ad1c..49415bc9 100644 --- a/scene/ground/scene/c01/s11_黄包车演出.tscn +++ b/scene/ground/scene/c01/s11_黄包车演出.tscn @@ -154,10 +154,6 @@ libraries = { &"": SubResource("AnimationLibrary_6ojod") } script = ExtResource("2_espm6") -debug_global_data = Dictionary[String, Variant]({ -"enabled_items": ["prop_火柴", "prop_院长的信", "prop_银元"] -}) -oneshot_animation = "" [node name="黄包车Sfx" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"] stream = ExtResource("3_ummkx") diff --git a/scene/ground/scene/c01/s12_书店外_诡异版.tscn b/scene/ground/scene/c01/s12_书店外_诡异版.tscn index 9dfeb5a5..9983f0b9 100644 --- a/scene/ground/scene/c01/s12_书店外_诡异版.tscn +++ b/scene/ground/scene/c01/s12_书店外_诡异版.tscn @@ -77,33 +77,6 @@ libraries = { &"": SubResource("AnimationLibrary_38lx7") } script = ExtResource("2_krdvw") -debug_global_data = Dictionary[String, Variant]({ -"enabled_items": { -"prop_银元": true -}, -"player_x": 1500.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"AmbushIntro": { -"played": false -}, -"AmbushSuccess": { -"played": false -}, -"Ambush举碗小孩": { -"played": false -}, -"Ambush玩家被抓": { -"played": false -}, -"AnimationPlayer": { -"oneshot_animation_played": false -}, -"Interactable碗": { -"interacted_times": 0 -} -}) -oneshot_animation = "" [node name="BgmControl" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_p7n7n") diff --git a/scene/ground/scene/c02/s01_公寓门口.tscn b/scene/ground/scene/c02/s01_公寓门口.tscn index bdbb780b..455fcce5 100644 --- a/scene/ground/scene/c02/s01_公寓门口.tscn +++ b/scene/ground/scene/c02/s01_公寓门口.tscn @@ -20,14 +20,6 @@ player_y = 60 [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_jfumy") -data = { -"oneshot_animation_played": false, -"received_letter": false -} -debug_global_data = Dictionary[String, Variant]({ -"enabled_items": ["prop_火柴", "prop_院长的信", "prop_银元"] -}) -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_bhi7l") diff --git a/scene/ground/scene/c02/s02_过道.tscn b/scene/ground/scene/c02/s02_过道.tscn index dd67a100..873609fc 100644 --- a/scene/ground/scene/c02/s02_过道.tscn +++ b/scene/ground/scene/c02/s02_过道.tscn @@ -57,64 +57,6 @@ libraries = { &"": SubResource("AnimationLibrary_fjkfm") } script = ExtResource("2_5p8ev") -data = { -"display_paper_man": false, -"first_enter": false, -"flyer_shaven": false, -"oneshot_animation_played": false -} -debug_global_data = Dictionary[String, Variant]({ -"c02_musicbox_danzhu_taken": false, -"c02_musicbox_pic_taken": false, -"c02_musicbox_stage": 0, -"c02_musicbox_xiaochan_taken": false, -"c02_musicbox_xiaomao_taken": false, -"c02_s02_mouse_push_shoe": false, -"enabled_items": { -"prop_火柴": true -}, -"handnote_c02_musicbox_needPuppet": 0, -"player_x": 530.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"Ambush太暗了": { -"played": false -}, -"Ambush小蝉闪现": { -"played": false -}, -"Ambush推小鞋子": { -"played": false -}, -"Ambush杂物堆": { -"played": false -}, -"Ambush纸人": { -"played": false -}, -"AnimationPlayer": { -"display_paper_man": false, -"first_enter": true, -"flyer_shaven": false, -"oneshot_animation_played": false -}, -"Closeup八音盒": { -"interacted_times": 0 -}, -"Closeup刮海报": { -"interacted_times": 0 -}, -"InteractableLeftPortal": { -"interacted_times": 0 -}, -"Interactable小鞋子": { -"interacted_times": 0 -}, -"煤油灯": { -"interacted_times": 0 -} -}) -oneshot_animation = "" [node name="冷飕飕Sfx" parent="Ground/AnimationPlayer" index="0" instance=ExtResource("3_fvldj")] stream = ExtResource("4_36l5t") diff --git a/scene/ground/scene/c02/s03_院子.gd b/scene/ground/scene/c02/s03_院子.gd index e3aaad4b..4c5058e0 100644 --- a/scene/ground/scene/c02/s03_院子.gd +++ b/scene/ground/scene/c02/s03_院子.gd @@ -81,7 +81,7 @@ func _on_ground_ready() -> void: small_shoe = $"../DeployLayer/Pickable小鞋子" as Pickable2D # 1: 已交互疯子; 2:小鞋已掉落 - if EventManager.get_stage("c02_madman_interacted") == 1: + if EventManager.get_stage("c02_madman_interacted_stage") == 1: SceneManager.lock_player(0) # 等待转场 await Util.wait(1) @@ -105,7 +105,7 @@ func _on_ground_ready() -> void: $"../BGSprite2D/无头小蝶".play() $"../CameraFocusMarker".limit_top -= 1000 SceneManager.pop_debug_dialog_info("美术", "小鞋子掉落") - elif EventManager.get_stage("c02_madman_interacted") == 2: + elif EventManager.get_stage("c02_madman_interacted_stage") == 2: small_shoe.enabled = true bully_layer = $"../DeployLayer/霸凌" @@ -120,11 +120,11 @@ func drop_shoe(progress: float, y1: float, y2: float): func cg_end() -> void: - SceneManager.unlock_player() # SceneManager.enable_prop_item("prop_小鞋子2") - EventManager.set_stage("c02_madman_interacted", 2) + EventManager.set_stage("c02_madman_interacted_stage", 2) #$"../CameraFocusMarker".limit_top += 1000 create_tween().tween_property(fg, "modulate:a", 1.0, 1.5) + SceneManager.unlock_player() func _on_gate_failed() -> void: diff --git a/scene/ground/scene/c02/s03_院子.tscn b/scene/ground/scene/c02/s03_院子.tscn index 45870273..063567da 100644 --- a/scene/ground/scene/c02/s03_院子.tscn +++ b/scene/ground/scene/c02/s03_院子.tscn @@ -283,92 +283,6 @@ libraries = { &"": SubResource("AnimationLibrary_iyaiw") } script = ExtResource("2_dt5aj") -data = { -"camera_played": false, -"oneshot_animation_played": false -} -debug_global_data = Dictionary[String, Variant]({ -"c02_ball_game_stage": 1, -"c02_burning": false, -"c02_burning_end_stage": 1, -"c02_counter_pushed_out": false, -"c02_eavesdrop_finished": false, -"c02_got_pliers": 0, -"c02_madman_hitwall": false, -"c02_madman_interacted": 0, -"c02_open_gate_first_failed": false, -"c02_ready_to_fire": false, -"c02_show_grounded_coins": false, -"c02_the_blind_room_unlocked": false, -"c02_watched_the_well": false, -"enabled_items": { -"prop_小鞋子2": true, -"prop_火柴": true, -"prop_老虎钳": true -}, -"handnote_c02_gate_chain": 1, -"handnote_c02_map_1Right": 1, -"handnote_c02_meat_knockDoor": 1, -"player_x": 1200.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"Ambush保卫科旁边os": { -"played": false -}, -"Ambush偷听对话": { -"played": false -}, -"Ambush惊悚闪电": { -"played": false -}, -"Ambush点火游戏阻挡右移": { -"played": false -}, -"Ambush等待的小蝉": { -"played": false -}, -"Ambush老虎钳后小蝉跑": { -"played": false -}, -"Ambush要下雨了": { -"played": false -}, -"Ambush闷雷纸人": { -"played": false -}, -"Ambush霸凌": { -"played": false -}, -"AnimationPlayer": { -"camera_played": false, -"oneshot_animation_played": false -}, -"Closeup井": { -"interacted_times": 0 -}, -"Closeup敲门游戏": { -"interacted_times": 0 -}, -"Interactable柜子": { -"interacted_times": 0 -}, -"Interactable铁门": { -"interacted_times": 0 -}, -"Pickable小鞋子": { -"picked": false -}, -"煤油灯": { -"interacted_times": 0 -}, -"煤油灯2": { -"interacted_times": 0 -}, -"煤油灯3": { -"interacted_times": 0 -} -}) -oneshot_animation = "" [node name="Sfx闷雷" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"] stream = ExtResource("6_vddfx") @@ -630,7 +544,7 @@ texture = ExtResource("8_plfv5") [node name="Event2D小蝉哼歌" type="Node2D" parent="Ground/DeployLayer" index="16"] position = Vector2(800, -173) script = ExtResource("26_o1qbs") -event = &"c02_madman_interacted" +event = &"c02_madman_interacted_stage" metadata/_custom_type_script = "uid://bkkiyk5jkdw4d" [node name="Sfx2D小蝉哼歌" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/Event2D小蝉哼歌"] diff --git a/scene/ground/scene/c02/s04_保卫科.tscn b/scene/ground/scene/c02/s04_保卫科.tscn index 04377220..dcb41c4b 100644 --- a/scene/ground/scene/c02/s04_保卫科.tscn +++ b/scene/ground/scene/c02/s04_保卫科.tscn @@ -32,43 +32,6 @@ player_y = 60 [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_jyere") -data = { -"oneshot_animation_played": false, -"tin_coin_collected": false -} -debug_global_data = Dictionary[String, Variant]({ -"c02_tin_coin_taken": 0, -"enabled_items": { -"prop_锡箔元宝": true -}, -"handnote_c02_list_namesAndGoal": 0, -"player_x": 30.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"Ambush进门看到小蝉": { -"played": false -}, -"AnimationPlayer": { -"oneshot_animation_played": false, -"tin_coin_collected": false -}, -"Closeup折锡纸": { -"interacted_times": 0 -}, -"Closeup老鼠精": { -"interacted_times": 0 -}, -"Closeup花名册": { -"interacted_times": 0 -}, -"Pickable元宝": { -"picked": false -}, -"煤油灯": { -"interacted_times": 0 -} -}) -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("5_g8amr") diff --git a/scene/ground/scene/c02/s05_一楼内侧楼道.gd b/scene/ground/scene/c02/s05_一楼内侧楼道.gd index f907d575..e01d5f7c 100644 --- a/scene/ground/scene/c02/s05_一楼内侧楼道.gd +++ b/scene/ground/scene/c02/s05_一楼内侧楼道.gd @@ -59,10 +59,10 @@ func mouse_pick_meat() -> void: func _on_madman_interacted() -> void: - if EventManager.get_stage("c02_madman_interacted") > 0: + if EventManager.get_stage("c02_madman_interacted_stage") > 0: return await DialogueManager.dialogue_ended - EventManager.set_stage("c02_madman_interacted", 1) + EventManager.set_stage("c02_madman_interacted_stage", 1) SceneManager.pop_os_with_str("c02_一楼疯子互动后") diff --git a/scene/ground/scene/c02/s05_一楼内侧楼道.tscn b/scene/ground/scene/c02/s05_一楼内侧楼道.tscn index 3dde268e..35d681c6 100644 --- a/scene/ground/scene/c02/s05_一楼内侧楼道.tscn +++ b/scene/ground/scene/c02/s05_一楼内侧楼道.tscn @@ -112,56 +112,6 @@ libraries = { &"": SubResource("AnimationLibrary_n48fn") } script = ExtResource("2_70lf6") -data = { -"has_entered": false, -"oneshot_animation_played": false -} -debug_global_data = Dictionary[String, Variant]({ -"c02_madman_hitwall": true, -"c02_madman_interacted": 0, -"c02_meat_dropping": true, -"c02_meat_given": false, -"enabled_items": { -"prop_奇怪的肉": true, -"prop_粘鼠板": true -}, -"handnote_c02_map_1Left": 0, -"handnote_c02_meat_knockDoor": 0, -"handnote_c02_meat_stopMouse": 0, -"handnote_c02_xchan_sheKnowsMe": 0, -"player_x": 30.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"Ambush小蝉消失": { -"played": false -}, -"Ambush更新一楼地图": { -"played": false -}, -"Ambush杂物堆": { -"played": false -}, -"Ambush老鼠叼肉": { -"played": false -}, -"AnimationPlayer": { -"has_entered": false, -"oneshot_animation_played": false -}, -"Closeup戏台": { -"interacted_times": 0 -}, -"Closeup拿人偶后记忆闪回": { -"interacted_times": 0 -}, -"Interactable粘鼠板": { -"interacted_times": 0 -}, -"Pickable掉落的肉": { -"picked": false -} -}) -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_laquj") @@ -364,7 +314,7 @@ flip_h = true [node name="Event2D小蝉哼歌" type="Node2D" parent="Ground/DeployLayer" index="18"] position = Vector2(92, 38) script = ExtResource("23_4c54f") -event = &"c02_madman_interacted" +event = &"c02_madman_interacted_stage" metadata/_custom_type_script = "uid://bkkiyk5jkdw4d" [node name="Sfx2D小蝉哼歌" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/Event2D小蝉哼歌"] diff --git a/scene/ground/scene/c02/s06_二楼.tscn b/scene/ground/scene/c02/s06_二楼.tscn index a2e2db12..61e926c7 100644 --- a/scene/ground/scene/c02/s06_二楼.tscn +++ b/scene/ground/scene/c02/s06_二楼.tscn @@ -897,55 +897,6 @@ libraries = { &"": SubResource("AnimationLibrary_k01ve") } script = ExtResource("2_4dg6u") -debug_global_data = Dictionary[String, Variant]({ -"c02_2f_xchan_run_away": 0, -"c02_ball_game_stage": 2, -"c02_burning_end_stage": 2, -"c02_madman_hitwall": false, -"c02_mouse_follow_player": false, -"c02_s02_mouse_push_shoe": false, -"c02_the_blind_room_unlocked": true, -"enabled_items": { -"prop_小鞋子1": true, -"prop_火柴": true -}, -"handnote_c02_map_2": 0, -"handnote_c02_shoe_giveToMouce": 0, -"player_x": 50.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"Ambush三男孩": { -"played": false -}, -"Ambush小蝉偷看": { -"played": false -}, -"Ambush解锁二楼地图": { -"played": false -}, -"Ambush走到尽头后小蝉跑": { -"played": false -}, -"AnimationPlayer": { -"oneshot_animation_played": false -}, -"Closeup弹珠游戏": { -"interacted_times": 0 -}, -"Closeup水盆": { -"interacted_times": 0 -}, -"Closeup谢幕演出": { -"interacted_times": 0 -}, -"Interactable老鼠洞": { -"interacted_times": 0 -}, -"煤油灯": { -"interacted_times": 0 -} -}) -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_h3h1a") diff --git a/scene/ground/scene/c02/s07_二楼内侧楼道.tscn b/scene/ground/scene/c02/s07_二楼内侧楼道.tscn index 341aa19d..0855516d 100644 --- a/scene/ground/scene/c02/s07_二楼内侧楼道.tscn +++ b/scene/ground/scene/c02/s07_二楼内侧楼道.tscn @@ -27,33 +27,6 @@ player_y = 60 [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_t0s64") -data = { -"flyer_shaven": false, -"oneshot_animation_played": false -} -debug_global_data = Dictionary[String, Variant]({ -"enabled_items": { -"prop_粘鼠板": true, -"prop_锡箔元宝": true -}, -"player_x": 30.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"AnimationPlayer": { -"flyer_shaven": false, -"oneshot_animation_played": false -}, -"Closeup刮海报": { -"interacted_times": 0 -}, -"Pickable元宝": { -"picked": false -}, -"Pickable粘鼠板": { -"picked": false -} -}) -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_geise") diff --git a/scene/ground/scene/c02/s08_瞎子卧室.tscn b/scene/ground/scene/c02/s08_瞎子卧室.tscn index b9eecefd..a62e7d20 100644 --- a/scene/ground/scene/c02/s08_瞎子卧室.tscn +++ b/scene/ground/scene/c02/s08_瞎子卧室.tscn @@ -110,38 +110,6 @@ libraries = { &"": SubResource("AnimationLibrary_f7817") } script = ExtResource("2_m4uw8") -data = { -"first_entered": true, -"hole_interacted_times": 0, -"oneshot_animation_played": false -} -debug_global_data = Dictionary[String, Variant]({ -"c02_the_blind_room_unlocked": false, -"handnote_c02_split_illusionSpace": 0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"Ambush偷听": { -"played": false -}, -"Ambush回看洞口": { -"played": false -}, -"AnimationPlayer": { -"first_entered": false, -"hole_interacted_times": 0, -"oneshot_animation_played": false -}, -"Closeup画": { -"interacted_times": 0 -}, -"Closeup讨厌他们": { -"interacted_times": 0 -}, -"煤油灯": { -"interacted_times": 0 -} -}) -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_quq80") @@ -311,7 +279,6 @@ animation = &"c02_王癞子_蹲着呼吸" autoplay = "c02_王癞子_蹲着呼吸" [node name="Sfx2D癞子呼吸" type="AudioStreamPlayer2D" parent="Ground/DeployLayer/癞子偷窥"] -process_mode = 1 stream = ExtResource("20_ujhuc") volume_db = -5.0 max_distance = 700.0 diff --git a/scene/ground/scene/c02/s09_裂缝.tscn b/scene/ground/scene/c02/s09_裂缝.tscn index de705426..f9cba757 100644 --- a/scene/ground/scene/c02/s09_裂缝.tscn +++ b/scene/ground/scene/c02/s09_裂缝.tscn @@ -192,24 +192,6 @@ footstep_type = "crawling" [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_34a6f") -debug_global_data = Dictionary[String, Variant]({ -"c02_counter_pushed_out": false, -"c02_counter_x": 100.0, -"enabled_items": {}, -"player_x": 2000.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"Ambush剪影指天": { -"played": false -}, -"Ambush老鼠": { -"played": false -}, -"AnimationPlayer": { -"oneshot_animation_played": false -} -}) -oneshot_animation = "" [node name="背景音效_通道" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"] stream = ExtResource("3_qjenp") diff --git a/scene/ground/scene/c02/s10_空房间.tscn b/scene/ground/scene/c02/s10_空房间.tscn index 8cc272bd..a89b87b0 100644 --- a/scene/ground/scene/c02/s10_空房间.tscn +++ b/scene/ground/scene/c02/s10_空房间.tscn @@ -84,58 +84,6 @@ player_y = 60 [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_egtqi") -data = { -"display_wood_puppet": false, -"oneshot_animation_played": false -} -debug_global_data = Dictionary[String, Variant]({ -"c02_counter_pushed_out": false, -"c02_counter_x": -1.0, -"c02_entered_the_splitted_space": false, -"c02_the_blind_room_unlocked": false, -"enabled_items": { -"prop_小猫玩具的脑袋": true, -"prop_小蝉人偶": true, -"prop_无头小猫玩具": true, -"prop_木头人偶": true, -"prop_火柴": true -}, -"handnote_c02_xchan_giveHerPuppet": 0, -"handnote_c02_xchan_sheKnowsMe": 0, -"handnote_chapter_stage": 2, -"player_x": 30.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"Ambush首次进入血脚印": { -"played": true -}, -"AnimationPlayer": { -"display_wood_puppet": false, -"oneshot_animation_played": false -}, -"Closeup头套": { -"interacted_times": 0 -}, -"Interactable小蝉": { -"interacted_times": 0 -}, -"Interactable柜子": { -"interacted_times": 0 -}, -"Pickable小猫玩具脑袋": { -"picked": false -}, -"Pickable小蝉人偶": { -"picked": false -}, -"Pickable木头人偶": { -"picked": false -}, -"煤油灯": { -"interacted_times": 1 -} -}) -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_kqj5r") diff --git a/scene/ground/scene/c02/s11_一楼火灾.tscn b/scene/ground/scene/c02/s11_一楼火灾.tscn index 81c63016..33adaad0 100644 --- a/scene/ground/scene/c02/s11_一楼火灾.tscn +++ b/scene/ground/scene/c02/s11_一楼火灾.tscn @@ -26,7 +26,6 @@ player_y = 60 [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_dbjgm") -oneshot_animation = "" [node name="BGSprite2D" parent="Ground" index="2"] texture = ExtResource("3_rhopa") @@ -216,8 +215,15 @@ texture = ExtResource("11_yxsm1") [node name="MainPlayer" parent="Ground" index="5"] position = Vector2(70, 98) +player_movement_rect = Rect2(37, -158, 2213, 316) facing_direction = Vector2(1, 0) +[node name="CameraFocusMarker" parent="Ground" index="6"] +limit_left = 0 +limit_top = -158 +limit_right = 2380 +limit_bottom = 158 + [node name="FGParallaxLayer" parent="Ground/ParallaxForeground" index="1"] visible = false diff --git a/scene/ground/scene/c02/s12_盒子猫.tscn b/scene/ground/scene/c02/s12_盒子猫.tscn index a8a6d282..b3703116 100644 --- a/scene/ground/scene/c02/s12_盒子猫.tscn +++ b/scene/ground/scene/c02/s12_盒子猫.tscn @@ -19,17 +19,6 @@ footstep_type = "盒子猫" [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_7ah3n") -debug_global_data = Dictionary[String, Variant]({ -"c02_boxcat_skip_intro": 0, -"enabled_items": ["prop_火柴", "prop_院长的信", "prop_银元"], -"player_x": 30.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"AnimationPlayer": { -"oneshot_animation_played": false -} -}) -oneshot_animation = "" [node name="Sfx钻盒子演出" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"] stream = ExtResource("3_72mc1") diff --git a/scene/ground/scene/c02/s13_盒子猫二楼.tscn b/scene/ground/scene/c02/s13_盒子猫二楼.tscn index 45a50888..45ad7b5c 100644 --- a/scene/ground/scene/c02/s13_盒子猫二楼.tscn +++ b/scene/ground/scene/c02/s13_盒子猫二楼.tscn @@ -23,7 +23,6 @@ footstep_type = "盒子猫" [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_w5nqu") -oneshot_animation = "" [node name="Sfx结尾演出" type="AudioStreamPlayer" parent="Ground/AnimationPlayer" index="0"] stream = ExtResource("3_yywsi") @@ -111,6 +110,13 @@ position = Vector2(984, 76) [node name="MainPlayer" parent="Ground" index="5"] position = Vector2(41, 73) character = "盒子猫" +player_movement_rect = Rect2(37, -158, 833, 316) + +[node name="CameraFocusMarker" parent="Ground" index="6"] +limit_left = 0 +limit_top = -158 +limit_right = 903 +limit_bottom = 158 [node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"] position = Vector2(-1, -16) diff --git a/scene/ground/scene/c02/s14_盒子猫二楼内侧.tscn b/scene/ground/scene/c02/s14_盒子猫二楼内侧.tscn index 8cf2ad80..89ec1977 100644 --- a/scene/ground/scene/c02/s14_盒子猫二楼内侧.tscn +++ b/scene/ground/scene/c02/s14_盒子猫二楼内侧.tscn @@ -18,7 +18,6 @@ footstep_type = "盒子猫" [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_o47bv") -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_idisw") @@ -51,6 +50,13 @@ position = Vector2(193, 79) [node name="MainPlayer" parent="Ground" index="5"] position = Vector2(41, 73) character = "盒子猫" +player_movement_rect = Rect2(101, -158, 559, 316) + +[node name="CameraFocusMarker" parent="Ground" index="6"] +limit_left = 0 +limit_top = -158 +limit_right = 696 +limit_bottom = 158 [node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"] points = PackedVector2Array(101, 150, 660, 150) diff --git a/scene/ground/scene/c02/s15_盒子猫一楼内侧.tscn b/scene/ground/scene/c02/s15_盒子猫一楼内侧.tscn index 5fb98be6..96bbc946 100644 --- a/scene/ground/scene/c02/s15_盒子猫一楼内侧.tscn +++ b/scene/ground/scene/c02/s15_盒子猫一楼内侧.tscn @@ -17,7 +17,6 @@ footstep_type = "盒子猫" [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_etqjj") -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_etqjj") @@ -44,8 +43,15 @@ position = Vector2(76, 85) [node name="MainPlayer" parent="Ground" index="5"] position = Vector2(64, 73) character = "盒子猫" +player_movement_rect = Rect2(125, -158, 535, 316) facing_direction = Vector2(1, 0) +[node name="CameraFocusMarker" parent="Ground" index="6"] +limit_left = 0 +limit_top = -158 +limit_right = 696 +limit_bottom = 158 + [node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"] position = Vector2(-1, -15) diff --git a/scene/ground/scene/c02/s16_盒子猫三楼内侧.tscn b/scene/ground/scene/c02/s16_盒子猫三楼内侧.tscn index 67a0fbd5..c9af93a8 100644 --- a/scene/ground/scene/c02/s16_盒子猫三楼内侧.tscn +++ b/scene/ground/scene/c02/s16_盒子猫三楼内侧.tscn @@ -19,7 +19,6 @@ footstep_type = "盒子猫" [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_tmnwc") -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_r8qm5") @@ -56,8 +55,15 @@ global_method = "c02_cat_play_with_door" [node name="MainPlayer" parent="Ground" index="5"] position = Vector2(235, 73) character = "盒子猫" +player_movement_rect = Rect2(37, -158, 618, 316) facing_direction = Vector2(1, 0) +[node name="CameraFocusMarker" parent="Ground" index="6"] +limit_left = 0 +limit_top = -158 +limit_right = 696 +limit_bottom = 158 + [node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"] position = Vector2(3584, -7) diff --git a/scene/ground/scene/c02/s17_盒子猫三楼.tscn b/scene/ground/scene/c02/s17_盒子猫三楼.tscn index e8c06e75..7eb2af9e 100644 --- a/scene/ground/scene/c02/s17_盒子猫三楼.tscn +++ b/scene/ground/scene/c02/s17_盒子猫三楼.tscn @@ -19,7 +19,6 @@ footstep_type = "盒子猫" [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_e436a") -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_uua76") @@ -59,8 +58,15 @@ global_method = "c02_cat_play_with_door" [node name="MainPlayer" parent="Ground" index="5"] position = Vector2(235, 73) character = "盒子猫" +player_movement_rect = Rect2(26, -158, 842, 316) facing_direction = Vector2(1, 0) +[node name="CameraFocusMarker" parent="Ground" index="6"] +limit_left = 0 +limit_top = -158 +limit_right = 903 +limit_bottom = 158 + [node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"] position = Vector2(3584, -7) diff --git a/scene/ground/scene/c02/s18_盒子猫一楼.tscn b/scene/ground/scene/c02/s18_盒子猫一楼.tscn index 7b007885..834cb2a1 100644 --- a/scene/ground/scene/c02/s18_盒子猫一楼.tscn +++ b/scene/ground/scene/c02/s18_盒子猫一楼.tscn @@ -18,7 +18,6 @@ footstep_type = "盒子猫" [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_4bsvj") -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_4bsvj") @@ -73,8 +72,15 @@ position = Vector2(-18, 74) [node name="MainPlayer" parent="Ground" index="5"] position = Vector2(235, 73) character = "盒子猫" +player_movement_rect = Rect2(37, -158, 823, 316) facing_direction = Vector2(1, 0) +[node name="CameraFocusMarker" parent="Ground" index="6"] +limit_left = 0 +limit_top = -158 +limit_right = 903 +limit_bottom = 158 + [node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"] position = Vector2(3584, -7) diff --git a/scene/ground/scene/c03/s01_三楼.tscn b/scene/ground/scene/c03/s01_三楼.tscn index 5090b35f..234e10da 100644 --- a/scene/ground/scene/c03/s01_三楼.tscn +++ b/scene/ground/scene/c03/s01_三楼.tscn @@ -182,25 +182,6 @@ libraries = { &"": SubResource("AnimationLibrary_k01ve") } script = ExtResource("2_ow08b") -debug_global_data = Dictionary[String, Variant]({ -"c03_s01_meat_put": 0, -"enabled_items": Dictionary[String, bool]({ -"prop_奇怪的肉": true -}), -"player_x": 500.0 -}) -debug_ground_data = Dictionary[String, Variant]({ -"AnimationPlayer": { -"oneshot_animation_played": false -}, -"CloseupDemo公告": { -"interacted_times": 0 -}, -"Interactable放肉处": { -"interacted_times": 0 -} -}) -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_lb1oo") diff --git a/scene/ground/scene/c03/s02_三楼内侧.tscn b/scene/ground/scene/c03/s02_三楼内侧.tscn index fa75c0c4..39599b5b 100644 --- a/scene/ground/scene/c03/s02_三楼内侧.tscn +++ b/scene/ground/scene/c03/s02_三楼内侧.tscn @@ -119,10 +119,6 @@ libraries = { &"": SubResource("AnimationLibrary_k01ve") } script = ExtResource("2_3pvs8") -debug_global_data = Dictionary[String, Variant]({ -"enabled_items": ["prop_火柴", "prop_院长的信", "prop_银元"] -}) -oneshot_animation = "" [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] script = ExtResource("3_a2vck") @@ -145,8 +141,15 @@ position = Vector2(873, 15) [node name="MainPlayer" parent="Ground" index="5"] position = Vector2(63, 95) catty_light_energy = 0.5 +player_movement_rect = Rect2(26, -158, 874, 316) facing_direction = Vector2(1, 0) +[node name="CameraFocusMarker" parent="Ground" index="6"] +limit_left = 0 +limit_top = -158 +limit_right = 927 +limit_bottom = 158 + [node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"] position = Vector2(0, -5) scale = Vector2(1.1, 1.1) diff --git a/scene/ground/scene/c03/s02_瞎子理发店.tscn b/scene/ground/scene/c03/s03_瞎子理发店.tscn similarity index 85% rename from scene/ground/scene/c03/s02_瞎子理发店.tscn rename to scene/ground/scene/c03/s03_瞎子理发店.tscn index b201b36f..ffd7716c 100644 --- a/scene/ground/scene/c03/s02_瞎子理发店.tscn +++ b/scene/ground/scene/c03/s03_瞎子理发店.tscn @@ -1,10 +1,10 @@ [gd_scene load_steps=10 format=3 uid="uid://bsqt2c061fmin"] -[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_3wf66"] -[ext_resource type="Script" uid="uid://cim5bqm2nayls" path="res://scene/ground/scene/c03/s03_瞎子理发店.gd" id="2_bgfwa"] -[ext_resource type="Script" uid="uid://cpejxlfni6n52" path="res://manager/audio_manager/vibe_sfx.gd" id="3_e8ujm"] -[ext_resource type="Texture2D" uid="uid://6ol2om68cd1q" path="res://asset/art/scene/c02/s06_二楼楼道/bg_背景.png" id="4_d832i"] -[ext_resource type="Texture2D" uid="uid://crev0svowqla" path="res://asset/art/scene/c02/s06_二楼楼道/fg_前景.png" id="5_to2km"] +[ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_40yjl"] +[ext_resource type="Script" uid="uid://cim5bqm2nayls" path="res://scene/ground/scene/c03/s03_瞎子理发店.gd" id="2_irgvj"] +[ext_resource type="Script" uid="uid://cpejxlfni6n52" path="res://manager/audio_manager/vibe_sfx.gd" id="3_d40x1"] +[ext_resource type="Texture2D" uid="uid://6ol2om68cd1q" path="res://asset/art/scene/c02/s06_二楼楼道/bg_背景.png" id="4_j7tjd"] +[ext_resource type="Texture2D" uid="uid://crev0svowqla" path="res://asset/art/scene/c02/s06_二楼楼道/fg_前景.png" id="5_dcuy3"] [sub_resource type="Animation" id="Animation_k01ve"] length = 0.001 @@ -109,8 +109,9 @@ _data = { } [node name="S03" type="Node2D"] +metadata/_edit_horizontal_guides_ = [-627.0] -[node name="Ground" parent="." instance=ExtResource("1_3wf66")] +[node name="Ground" parent="." instance=ExtResource("1_40yjl")] scene_name = "c03_s03" player_y = 60 @@ -118,21 +119,17 @@ player_y = 60 libraries = { &"": SubResource("AnimationLibrary_k01ve") } -script = ExtResource("2_bgfwa") -debug_global_data = Dictionary[String, Variant]({ -"enabled_items": ["prop_火柴", "prop_院长的信", "prop_银元"] -}) -oneshot_animation = "" +script = ExtResource("2_irgvj") [node name="VibeSfx" type="Node" parent="Ground/AnimationPlayer" index="0"] -script = ExtResource("3_e8ujm") +script = ExtResource("3_d40x1") autoplay_group = &"c02_楼道2" metadata/_custom_type_script = "uid://cpejxlfni6n52" [node name="BGSprite2D" parent="Ground" index="2"] light_mask = 5 position = Vector2(0, -2) -texture = ExtResource("4_d832i") +texture = ExtResource("4_j7tjd") [node name="portal_left" parent="Ground/DeployLayer" index="0"] position = Vector2(34, 8) @@ -145,12 +142,19 @@ position = Vector2(873, 15) [node name="MainPlayer" parent="Ground" index="5"] position = Vector2(63, 95) catty_light_energy = 0.5 +player_movement_rect = Rect2(26, -158, 874, 316) facing_direction = Vector2(1, 0) +[node name="CameraFocusMarker" parent="Ground" index="6"] +limit_left = 0 +limit_top = -158 +limit_right = 927 +limit_bottom = 158 + [node name="FGSprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="0"] position = Vector2(0, -5) scale = Vector2(1.1, 1.1) -texture = ExtResource("5_to2km") +texture = ExtResource("5_dcuy3") [node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"] points = PackedVector2Array(26, 150, 900, 150) diff --git a/scene/ground/scene/debug_archive.txt b/scene/ground/scene/debug_archive.txt new file mode 100644 index 00000000..573e955e --- /dev/null +++ b/scene/ground/scene/debug_archive.txt @@ -0,0 +1,46 @@ +{ +"c02_s05_一楼内侧楼道": { +"global": { +"c02_madman_hitwall": true, +"c02_madman_interacted_stage": 0, +"c02_meat_dropping": false, +"c02_meat_given": false, +"enabled_items": { +"prop_奇怪的肉": true, +"prop_粘鼠板": true +}, +"handnote_c02_map_1Left": 0, +"handnote_c02_meat_knockDoor": 0, +"handnote_c02_meat_stopMouse": 0, +"handnote_c02_xchan_sheKnowsMe": 0, +"player_x": 30.0 +}, +"ground": { +&"Ambush小蝉消失": { +"played": false +}, +&"Ambush更新一楼地图": { +"played": false +}, +&"Ambush杂物堆": { +"played": false +}, +&"Ambush老鼠叼肉": { +"played": false +}, +&"AnimationPlayer": {}, +&"Closeup戏台": { +"interacted_times": 0 +}, +&"Closeup拿人偶后记忆闪回": { +"interacted_times": 0 +}, +&"Interactable粘鼠板": { +"interacted_times": 0 +}, +&"Pickable掉落的肉": { +"picked": false +} +} +} +} \ No newline at end of file diff --git a/scene/ground/scene/template_scene.tscn b/scene/ground/scene/template_scene.tscn index 23a8d8b1..a471053a 100644 --- a/scene/ground/scene/template_scene.tscn +++ b/scene/ground/scene/template_scene.tscn @@ -9,6 +9,14 @@ [node name="AnimationPlayer" parent="Ground" index="0"] script = ExtResource("2_oj87v") -oneshot_animation = "" + +[node name="MainPlayer" parent="Ground" index="5"] +player_movement_rect = Rect2(20, -158, 524, 316) + +[node name="CameraFocusMarker" parent="Ground" index="6"] +limit_left = 0 +limit_top = -158 +limit_right = 564 +limit_bottom = 158 [editable path="Ground"]