diff --git a/asset/art/ui/键位提示.png b/asset/art/ui/键位提示.png new file mode 100644 index 00000000..3cfa877e Binary files /dev/null and b/asset/art/ui/键位提示.png differ diff --git a/asset/art/ui/键位提示.png.import b/asset/art/ui/键位提示.png.import new file mode 100644 index 00000000..eea433b2 --- /dev/null +++ b/asset/art/ui/键位提示.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://jnw2yk6ls0fj" +path="res://.godot/imported/键位提示.png-64709bcd377e39f225bc60843c2472b7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://asset/art/ui/键位提示.png" +dest_files=["res://.godot/imported/键位提示.png-64709bcd377e39f225bc60843c2472b7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/asset/art/ui/键位提示_带背景.jpeg b/asset/art/ui/键位提示_带背景.jpeg new file mode 100644 index 00000000..af462803 Binary files /dev/null and b/asset/art/ui/键位提示_带背景.jpeg differ diff --git a/asset/art/ui/键位提示_带背景.jpeg.import b/asset/art/ui/键位提示_带背景.jpeg.import new file mode 100644 index 00000000..972a3764 --- /dev/null +++ b/asset/art/ui/键位提示_带背景.jpeg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bb3khctfdyap8" +path="res://.godot/imported/键位提示_带背景.jpeg-07d430663777eab7f02ee130e18c9ded.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://asset/art/ui/键位提示_带背景.jpeg" +dest_files=["res://.godot/imported/键位提示_带背景.jpeg-07d430663777eab7f02ee130e18c9ded.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/asset/dialogue/item_description.csv b/asset/dialogue/item_description.csv index 47427b10..f44d113e 100644 --- a/asset/dialogue/item_description.csv +++ b/asset/dialogue/item_description.csv @@ -66,6 +66,16 @@ ui_退出,退出,,,,,Exit ui_阅读,阅读,,,,,Read ui_检阅,检阅,,,,,Examine ui_收起,收起,,,,,Put away +ui_key_z,上个道具,,,,,Previous +ui_key_c,下个道具,,,,,Next +ui_key_a,向左走,,,,,Left +ui_key_d,向右走,,,,,Right +ui_key_q,取消,,,,,Cancel +ui_key_e,交互,,,,,Interact +ui_key_esc,退出,,,,,Exit +ui_key_b,重要物品,,,,,Bag +ui_key_n,笔记,,,,,Note +ui_key_m,回忆,,,,,Memory ui_夜行船1,百岁光阴一梦蝶。,,,,,"A hundred years of life, like a butterfly's dream." ui_夜行船2,重回首往事堪嗟。,,,,,"Looking back, past events are cause for lament." ui_夜行船4,今日春来,明朝花谢。,,,,,"Spring comes today, tomorrow the flowers will wither." diff --git a/asset/dialogue/item_description.dialogue b/asset/dialogue/item_description.dialogue index 955fd5ed..519d2ac2 100644 --- a/asset/dialogue/item_description.dialogue +++ b/asset/dialogue/item_description.dialogue @@ -71,12 +71,23 @@ 获得道具 [ID:ui_获得道具] -重要物品 [ID:ui_获得重要物品] 退出 [ID:ui_退出] 阅读 [ID:ui_阅读] 检阅 [ID:ui_检阅] 收起 [ID:ui_收起] +上个道具 [ID:ui_key_z] +下个道具 [ID:ui_key_c] +向左走 [ID:ui_key_a] +向右走 [ID:ui_key_d] +取消 [ID:ui_key_q] +交互 [ID:ui_key_e] +退出 [ID:ui_key_esc] +重要物品 [ID:ui_key_b] +笔记 [ID:ui_key_n] +回忆 [ID:ui_key_m] + + 百岁光阴一梦蝶。 [ID:ui_夜行船1] 重回首往事堪嗟。 [ID:ui_夜行船2] #今日春来 [ID:ui_夜行船3] diff --git a/scene/ground/scene/c01/s05_院长房间.gd b/scene/ground/scene/c01/s05_院长房间.gd index b41543ea..5ed3bb79 100644 --- a/scene/ground/scene/c01/s05_院长房间.gd +++ b/scene/ground/scene/c01/s05_院长房间.gd @@ -24,6 +24,7 @@ func _setup_display_on_locale(): $"Intro/Content/水平排版".visible = not is_zh $"Intro/Content/竖直排版".visible = is_zh + func _notification(what: int) -> void: if what == NOTIFICATION_TRANSLATION_CHANGED: _setup_display_on_locale() @@ -44,8 +45,10 @@ func play_intro_dialogue(): # 直接使用 sfx,防止下方字幕与全屏文字重复 $intro_audio_player.play() +var tip: Node2D func _on_ground_ready() -> void: + tip = $"../ParallaxForeground/FGParallaxLayer/键位提示" ArchiveManager.set_chapter_if_greater(1) ambush = $"../DeployLayer/ambush鸡毛掸子" frame = $"../DeployLayer/画框" @@ -95,7 +98,9 @@ func _on_ground_ready() -> void: func cant_read() -> void: - DialogueManager.show_dialogue_balloon(dialogue_c01, "c01_s05_院长房间_看不清了", [GlobalConfig.DIALOG_IGNORE_INPUT]) + DialogueManager.show_dialogue_balloon( + dialogue_c01, "c01_s05_院长房间_看不清了", [GlobalConfig.DIALOG_IGNORE_INPUT] + ) func os_find_wig() -> void: @@ -178,8 +183,38 @@ func _on_piano_interacted(): SceneManager.pop_debug_dialog_info("音效", "钢琴声: " + str(piano_id)) +var help_tween: Tween +var help_tween_paused := false + + func show_interact_help(): + tip.modulate.a = 0.0 + tip.show() + SceneManager.lock_player() + help_tween = create_tween() + help_tween.tween_property(tip, "modulate:a", 1.0, 1.0) + help_tween.tween_callback(func (): + help_tween_paused = true + Util.timer(2.0, _breath_light) + help_tween.pause() + ) + help_tween.tween_property(tip, "modulate:a", 0.0, 1.0) + await help_tween.finished + SceneManager.unlock_player() + await Util.wait(0.5) SceneManager.pop_center_notification("ui_center_notify_a_d_to_move") await Util.wait(5.0) SceneManager.pop_center_notification("ui_center_notify_press_e_to_interact") - + + +func _breath_light() -> void: + var light = tip.get_node("PointLight2D") as PointLight2D + var tween = create_tween() + tween.tween_property(light, "energy", 1.0, 1.0) + tween.tween_property(light, "energy", 0.0, 1.0) + tween.tween_callback(_breath_light) + + +func _unhandled_input(event: InputEvent) -> void: + if help_tween_paused and event.is_action_pressed("cancel"): + help_tween.play() diff --git a/scene/ground/scene/c01/s05_院长房间.tscn b/scene/ground/scene/c01/s05_院长房间.tscn index b1aaf0f6..dcffb428 100644 --- a/scene/ground/scene/c01/s05_院长房间.tscn +++ b/scene/ground/scene/c01/s05_院长房间.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=38 format=3 uid="uid://dlx5xxbg53rb8"] +[gd_scene load_steps=41 format=3 uid="uid://dlx5xxbg53rb8"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_ff4yb"] [ext_resource type="Script" uid="uid://q2qgg85xa6ie" path="res://scene/ground/scene/c01/s05_院长房间.gd" id="2_j5oim"] @@ -20,6 +20,7 @@ [ext_resource type="PackedScene" uid="uid://jr1yd46wm5je" path="res://scene/entity/note.tscn" id="10_18v0g"] [ext_resource type="Script" uid="uid://wapo47a1oddf" path="res://scene/entity/audio/sfx2d.gd" id="10_kyds0"] [ext_resource type="Texture2D" uid="uid://choqjery7hf58" path="res://asset/art/scene/c01/s05_院长房间/e_画框.png" id="11_6gq1s"] +[ext_resource type="Texture2D" uid="uid://jnw2yk6ls0fj" path="res://asset/art/ui/键位提示.png" id="11_247wt"] [ext_resource type="Texture2D" uid="uid://dae5yrbb5llia" path="res://asset/art/scene/c01/s05_院长房间/e_鸡毛掸子.png" id="12_jtglg"] [ext_resource type="SpriteFrames" uid="uid://b7fhheih1hbvf" path="res://config/animation/entity_sprite_frames.tres" id="14_e1bmq"] [ext_resource type="PackedScene" uid="uid://cw3q5pvciumil" path="res://scene/entity/interactable.tscn" id="14_lq1ou"] @@ -30,6 +31,8 @@ [ext_resource type="Texture2D" uid="uid://gui0ubwlwoi0" path="res://asset/art/ui/action_mark/UI手.png" id="22_00ufd"] [ext_resource type="LabelSettings" uid="uid://dd6jhbqr6uh3x" path="res://config/序章夜行船_label_settings.tres" id="28_8gx6s"] [ext_resource type="Script" uid="uid://dpocj5al0rvai" path="res://ui/text_helper.gd" id="29_247wt"] +[ext_resource type="Texture2D" uid="uid://b7gyapghy3tsy" path="res://asset/art/neutral_point_light.png" id="31_qf7jl"] +[ext_resource type="FontVariation" uid="uid://1ryw42kej6lv" path="res://config/font_ui.tres" id="31_w4f3l"] [sub_resource type="Animation" id="Animation_c6mhi"] length = 0.001 @@ -865,6 +868,7 @@ position = Vector2(27, 3) [node name="portal_right" parent="Ground/DeployLayer" index="1"] position = Vector2(503, 11) texture = ExtResource("4_gdhoy") +sign_mark_offset = Vector2(0, -46) target_scene = "c01_s06" target_portal = "left" status = "opened" @@ -984,6 +988,257 @@ position = Vector2(21, 39) texture = ExtResource("3_vmr0f") offset = Vector2(0, 0) +[node name="键位提示" type="Node2D" parent="Ground/ParallaxForeground/FGParallaxLayer" index="1"] +visible = false + +[node name="提示图" type="Sprite2D" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"] +light_mask = 3 +position = Vector2(0, -158) +scale = Vector2(0.25, 0.25) +texture = ExtResource("11_247wt") +centered = false + +[node name="PointLight2D" type="PointLight2D" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"] +position = Vector2(230, -14) +color = Color(0, 0.770832, 0.205171, 1) +energy = 0.0 +range_layer_min = 1 +range_layer_max = 10 +range_item_cull_mask = 2 +texture = ExtResource("31_qf7jl") +texture_scale = 0.3 + +[node name="z" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"] +layout_mode = 3 +anchors_preset = 0 +offset_left = 100.0 +offset_top = -83.0 +offset_right = 100.0 +offset_bottom = -83.0 +mouse_filter = 2 + +[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/z"] +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -21.5 +offset_right = 21.5 +offset_bottom = 14.0 +grow_horizontal = 2 +theme_override_fonts/font = ExtResource("31_w4f3l") +text = "ui_key_z" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="c" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"] +layout_mode = 3 +anchors_preset = 0 +offset_left = 143.0 +offset_top = -83.0 +offset_right = 143.0 +offset_bottom = -83.0 +mouse_filter = 2 + +[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/c"] +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -21.5 +offset_right = 21.5 +offset_bottom = 14.0 +grow_horizontal = 2 +theme_override_fonts/font = ExtResource("31_w4f3l") +text = "ui_key_c" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="a" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"] +layout_mode = 3 +anchors_preset = 0 +offset_left = 71.0 +offset_top = 21.0 +offset_right = 71.0 +offset_bottom = 21.0 +mouse_filter = 2 + +[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/a"] +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -21.5 +offset_right = 21.5 +offset_bottom = 14.0 +grow_horizontal = 2 +theme_override_fonts/font = ExtResource("31_w4f3l") +text = "ui_key_a" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="d" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"] +layout_mode = 3 +anchors_preset = 0 +offset_left = 111.0 +offset_top = 21.0 +offset_right = 111.0 +offset_bottom = 21.0 +mouse_filter = 2 + +[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/d"] +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -21.5 +offset_right = 21.5 +offset_bottom = 14.0 +grow_horizontal = 2 +theme_override_fonts/font = ExtResource("31_w4f3l") +text = "ui_key_d" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="q" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"] +layout_mode = 3 +anchors_preset = 0 +offset_left = 229.0 +offset_top = -3.0 +offset_right = 229.0 +offset_bottom = -3.0 +mouse_filter = 2 + +[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/q"] +light_mask = 3 +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -21.5 +offset_right = 21.5 +offset_bottom = 14.0 +grow_horizontal = 2 +theme_override_fonts/font = ExtResource("31_w4f3l") +text = "ui_key_q" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="e" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"] +layout_mode = 3 +anchors_preset = 0 +offset_left = 326.0 +offset_top = -2.0 +offset_right = 326.0 +offset_bottom = -2.0 +mouse_filter = 2 + +[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/e"] +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -21.5 +offset_right = 21.5 +offset_bottom = 14.0 +grow_horizontal = 2 +theme_override_fonts/font = ExtResource("31_w4f3l") +text = "ui_key_e" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="esc" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"] +layout_mode = 3 +anchors_preset = 0 +offset_left = 306.0 +offset_top = 80.0 +offset_right = 306.0 +offset_bottom = 80.0 +mouse_filter = 2 + +[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/esc"] +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -21.5 +offset_right = 21.5 +offset_bottom = 14.0 +grow_horizontal = 2 +theme_override_fonts/font = ExtResource("31_w4f3l") +text = "ui_key_esc" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="b" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"] +layout_mode = 3 +anchors_preset = 0 +offset_left = 365.0 +offset_top = 80.0 +offset_right = 365.0 +offset_bottom = 80.0 +mouse_filter = 2 + +[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/b"] +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -21.5 +offset_right = 21.5 +offset_bottom = 14.0 +grow_horizontal = 2 +theme_override_fonts/font = ExtResource("31_w4f3l") +text = "ui_key_b" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="n" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"] +layout_mode = 3 +anchors_preset = 0 +offset_left = 427.0 +offset_top = 80.0 +offset_right = 427.0 +offset_bottom = 80.0 +mouse_filter = 2 + +[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/n"] +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -21.5 +offset_right = 21.5 +offset_bottom = 14.0 +grow_horizontal = 2 +theme_override_fonts/font = ExtResource("31_w4f3l") +text = "ui_key_n" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="m" type="Control" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示"] +layout_mode = 3 +anchors_preset = 0 +offset_left = 486.0 +offset_top = 80.0 +offset_right = 486.0 +offset_bottom = 80.0 +mouse_filter = 2 + +[node name="Label" type="Label" parent="Ground/ParallaxForeground/FGParallaxLayer/键位提示/m"] +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -21.5 +offset_right = 21.5 +offset_bottom = 14.0 +grow_horizontal = 2 +theme_override_fonts/font = ExtResource("31_w4f3l") +text = "ui_key_m" +horizontal_alignment = 1 +vertical_alignment = 1 + [node name="PlayerLine2D" parent="Ground/ParallaxForeground" index="2"] points = PackedVector2Array(40, 149, 530, 150) diff --git a/scene/ground/scene/c01/s09_公寓楼外.tscn b/scene/ground/scene/c01/s09_公寓楼外.tscn index b8dee9da..5c4a0c61 100644 --- a/scene/ground/scene/c01/s09_公寓楼外.tscn +++ b/scene/ground/scene/c01/s09_公寓楼外.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=30 format=3 uid="uid://c777lv8mjojcw"] +[gd_scene load_steps=28 format=3 uid="uid://c777lv8mjojcw"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_mrwu5"] [ext_resource type="Script" uid="uid://c7rvvsuf18ykn" path="res://scene/ground/scene/c01/s09_公寓楼外.gd" id="2_u053j"] @@ -19,7 +19,6 @@ [ext_resource type="SpriteFrames" uid="uid://c2peyi2l65h47" path="res://asset/art/gif/c01_公寓外街道/c01_公寓外街道_frames.tres" id="10_0ohlv"] [ext_resource type="Script" uid="uid://dxq5c05ab7uyu" path="res://scene/ground/script/c01/s00_ghost_footstep.gd" id="11_6w7lv"] [ext_resource type="Texture2D" uid="uid://b7gyapghy3tsy" path="res://asset/art/neutral_point_light.png" id="12_828bq"] -[ext_resource type="Texture2D" uid="uid://r0n7qy4kr3w2" path="res://asset/art/ui/action_mark/UI场景切换.png" id="12_lrqbi"] [ext_resource type="PackedScene" uid="uid://svvlohuicvhf" path="res://scene/entity/ambient/light.tscn" id="13_6w7lv"] [ext_resource type="Script" uid="uid://wapo47a1oddf" path="res://scene/entity/audio/sfx2d.gd" id="19_jgofb"] [ext_resource type="Script" uid="uid://baok7hk5jygpm" path="res://scene/ground/script/c01/s09_鬼影浮现.gd" id="20_nwvnr"] @@ -53,10 +52,6 @@ animations = [{ "speed": 5.0 }] -[sub_resource type="RectangleShape2D" id="RectangleShape2D_j34rt"] -resource_local_to_scene = true -size = Vector2(30, 130) - [sub_resource type="RectangleShape2D" id="RectangleShape2D_4sgc5"] size = Vector2(40, 80) @@ -118,28 +113,12 @@ frame = 0 [node name="portal_2" parent="Ground/DeployLayer" index="3" instance=ExtResource("3_4myxt")] position = Vector2(2938, 18) +collision_width_and_x = Vector2(75.04, 0) debug_note = "传送到公寓楼道" portal_name = "2" target_scene = "c01_s10" target_portal = "left" -[node name="SfxEnter" parent="Ground/DeployLayer/portal_2" index="2"] -stream = null - -[node name="Sign" parent="Ground/DeployLayer/portal_2" index="4"] -enabled = true - -[node name="TextureContainer" parent="Ground/DeployLayer/portal_2/Sign" index="0"] -offset_top = -50.0 -offset_bottom = -50.0 - -[node name="Sprite2D" parent="Ground/DeployLayer/portal_2/Sign/TextureContainer" index="0"] -texture = ExtResource("12_lrqbi") - -[node name="CollisionShape2D" parent="Ground/DeployLayer/portal_2/Area2D" index="0"] -position = Vector2(5, 0) -shape = SubResource("RectangleShape2D_j34rt") - [node name="S01自动枯萎的花朵" parent="Ground/DeployLayer" index="4" node_paths=PackedStringArray("focus_node") instance=ExtResource("3_52pqy")] position = Vector2(539, 79) focus_node = NodePath("../Ghost") @@ -371,5 +350,3 @@ energy = 0.4 blend_mode = 1 [editable path="Ground"] -[editable path="Ground/DeployLayer/portal_2"] -[editable path="Ground/DeployLayer/portal_2/Sign"]