diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条1.png b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条.png similarity index 100% rename from asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条1.png rename to asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条.png diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条1.png.import b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条.png.import similarity index 76% rename from asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条1.png.import rename to asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条.png.import index 20b4279e..5030228e 100644 --- a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条1.png.import +++ b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://b2ectbek7vksi" -path="res://.godot/imported/三条1.png-8bf0cf7022375f14a66fa3a279e05592.ctex" +path="res://.godot/imported/三条.png-006a7f5a56a5188b7eef9e9fa25d5c05.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条1.png" -dest_files=["res://.godot/imported/三条1.png-8bf0cf7022375f14a66fa3a279e05592.ctex"] +source_file="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条.png" +dest_files=["res://.godot/imported/三条.png-006a7f5a56a5188b7eef9e9fa25d5c05.ctex"] [params] diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条2.png b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条2.png deleted file mode 100644 index 2b84cb0a..00000000 Binary files a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条2.png and /dev/null differ diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条2.png.import b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条2.png.import deleted file mode 100644 index f28a3b8e..00000000 --- a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条2.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://ca5j182ppemi3" -path="res://.godot/imported/三条2.png-a2626fadfb1e1db09c90dea5b8e116f3.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条2.png" -dest_files=["res://.godot/imported/三条2.png-a2626fadfb1e1db09c90dea5b8e116f3.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/scene/c03/s04_李癞房间/麻将游戏整理/三条3.png b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条3.png deleted file mode 100644 index 2b84cb0a..00000000 Binary files a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条3.png and /dev/null differ diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条3.png.import b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条3.png.import deleted file mode 100644 index f9a5d1f4..00000000 --- a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条3.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://cd6d3xjx5o6gg" -path="res://.godot/imported/三条3.png-1a94006389bc73b73b91ef87392019bc.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条3.png" -dest_files=["res://.godot/imported/三条3.png-1a94006389bc73b73b91ef87392019bc.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/scene/c03/s04_李癞房间/麻将游戏整理/三条4.png b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条4.png deleted file mode 100644 index 2b84cb0a..00000000 Binary files a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条4.png and /dev/null differ diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条4.png.import b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条4.png.import deleted file mode 100644 index a03fbcd3..00000000 --- a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条4.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://bl20arldcd04c" -path="res://.godot/imported/三条4.png-ba375ee2c04f48d353515b3451ac99bc.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条4.png" -dest_files=["res://.godot/imported/三条4.png-ba375ee2c04f48d353515b3451ac99bc.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/scene/c03/s04_李癞房间/麻将游戏整理/三条5.png b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条5.png deleted file mode 100644 index 2b84cb0a..00000000 Binary files a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条5.png and /dev/null differ diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条5.png.import b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条5.png.import deleted file mode 100644 index 1a705324..00000000 --- a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条5.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dtkl36brvsget" -path="res://.godot/imported/三条5.png-d5d54133d11d3fa1fda741a738814abb.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条5.png" -dest_files=["res://.godot/imported/三条5.png-d5d54133d11d3fa1fda741a738814abb.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/scene/c03/s04_李癞房间/麻将游戏整理/九筒1.png b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒.png similarity index 100% rename from asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒1.png rename to asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒.png diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒1.png.import b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒.png.import similarity index 76% rename from asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒1.png.import rename to asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒.png.import index c65198f7..45f14be6 100644 --- a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒1.png.import +++ b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dis6qtf1hvop2" -path="res://.godot/imported/九筒1.png-18236f0184e73de56fa7c07fd8818803.ctex" +path="res://.godot/imported/九筒.png-d07526be4eca6df206fc89177ab24ab4.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒1.png" -dest_files=["res://.godot/imported/九筒1.png-18236f0184e73de56fa7c07fd8818803.ctex"] +source_file="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒.png" +dest_files=["res://.godot/imported/九筒.png-d07526be4eca6df206fc89177ab24ab4.ctex"] [params] diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒2.png b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒2.png deleted file mode 100644 index a59d6140..00000000 Binary files a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒2.png and /dev/null differ diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒2.png.import b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒2.png.import deleted file mode 100644 index bd40d1cf..00000000 --- a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒2.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://2chok0puqbuu" -path="res://.godot/imported/九筒2.png-bc89e55e11457820e525987a48cfde7f.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒2.png" -dest_files=["res://.godot/imported/九筒2.png-bc89e55e11457820e525987a48cfde7f.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/scene/c03/s04_李癞房间/麻将游戏整理/伍万1.png b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万.png similarity index 100% rename from asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万1.png rename to asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万.png diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万1.png.import b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万.png.import similarity index 76% rename from asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万1.png.import rename to asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万.png.import index ccf36f80..33642fc4 100644 --- a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万1.png.import +++ b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bo4hrg3sqpoou" -path="res://.godot/imported/伍万1.png-4ec9f2f118ccecacb8103660b3409172.ctex" +path="res://.godot/imported/伍万.png-f602af5a13dbf28121c0612cccab058c.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万1.png" -dest_files=["res://.godot/imported/伍万1.png-4ec9f2f118ccecacb8103660b3409172.ctex"] +source_file="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万.png" +dest_files=["res://.godot/imported/伍万.png-f602af5a13dbf28121c0612cccab058c.ctex"] [params] diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万2.png b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万2.png deleted file mode 100644 index 66a7ef72..00000000 Binary files a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万2.png and /dev/null differ diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万2.png.import b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万2.png.import deleted file mode 100644 index 42bc31a9..00000000 --- a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万2.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://e86x6j8wu7sw" -path="res://.godot/imported/伍万2.png-e6d795d16b5afc137412be0ba118773a.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万2.png" -dest_files=["res://.godot/imported/伍万2.png-e6d795d16b5afc137412be0ba118773a.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/scene/c03/s04_李癞房间/麻将游戏整理/伍万3.png b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万3.png deleted file mode 100644 index 66a7ef72..00000000 Binary files a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万3.png and /dev/null differ diff --git a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万3.png.import b/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万3.png.import deleted file mode 100644 index cfb954f0..00000000 --- a/asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万3.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://q4vs78ohnnhw" -path="res://.godot/imported/伍万3.png-1bdc2d22c71c4accd4ee226af0345b7a.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万3.png" -dest_files=["res://.godot/imported/伍万3.png-1bdc2d22c71c4accd4ee226af0345b7a.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 a3a7fb87..52d4d782 100644 --- a/asset/dialogue/item_description.csv +++ b/asset/dialogue/item_description.csv @@ -41,6 +41,8 @@ ui_press_shift,按住 Shift 奔跑,,,,,Hold Shift to run ui_boxcat_press_s,按住 S 躲藏,,,,,Hold S to hide input_拼凑信件,点击选择信件碎片,方向键移动,E 旋碎片转,Q 退出,,,,,"Click to select letter fragments, arrow keys to move, E to rotate, Q to exit" input_书架游戏,点击书本可选中或交换,Q 退出,,,,,"Click books to select or swap, Q to exit" +input_麻将游戏_麻将不足,还缺一块麻将(幺鸡),,,,, +input_麻将游戏_操作规则,依次点击两块麻将可进行交换,,,,, ui_获得道具,获得道具,,,,,Item Obtained ui_获得重要物品,重要物品,,,,,Important Item ui_退出,退出,,,,,Exit diff --git a/asset/dialogue/item_description.dialogue b/asset/dialogue/item_description.dialogue index 8e52b854..f2fce026 100644 --- a/asset/dialogue/item_description.dialogue +++ b/asset/dialogue/item_description.dialogue @@ -49,6 +49,9 @@ 按住 S 躲藏 [ID:ui_boxcat_press_s] 点击选择信件碎片,方向键移动,E 旋碎片转,Q 退出 [ID:input_拼凑信件] 点击书本可选中或交换,Q 退出 [ID:input_书架游戏] +还缺一块麻将(幺鸡) [ID:input_麻将游戏_麻将不足] +依次点击两块麻将可进行交换 [ID:input_麻将游戏_操作规则] + 获得道具 [ID:ui_获得道具] 重要物品 [ID:ui_获得重要物品] diff --git a/scene/entity/closeup_template.gd b/scene/entity/closeup_template.gd index 728f7339..fe62835b 100644 --- a/scene/entity/closeup_template.gd +++ b/scene/entity/closeup_template.gd @@ -1,7 +1,8 @@ extends CanvasLayer +signal exit(arg) + @onready var bg = $BG as TextureRect - func _ready() -> void: layer = GlobalConfig.CANVAS_LAYER_LITTLE_GAME diff --git a/scene/ground/scene/c02/s06_二楼.tscn b/scene/ground/scene/c02/s06_二楼.tscn index dcf7258d..1407c85f 100644 --- a/scene/ground/scene/c02/s06_二楼.tscn +++ b/scene/ground/scene/c02/s06_二楼.tscn @@ -45,7 +45,7 @@ [ext_resource type="Texture2D" uid="uid://b5kolhax7pf4u" path="res://asset/art/scene/c02/s06_二楼楼道/小猫纸条.png" id="37_rjlld"] [ext_resource type="Script" uid="uid://bnm8wuspfx303" path="res://scene/ground/script/c02/event_2d_xchan_run_away.gd" id="39_t5e0j"] [ext_resource type="SpriteFrames" uid="uid://di43shn22n5ph" path="res://asset/art/gif/c00_通用动作/c00_通用动作_frames.tres" id="40_7i4w0"] -[ext_resource type="Script" uid="uid://n56a07gyjq1u" path="res://scene/ground/script/c03/s02_event_2d偷听陆仁小蝶对话后.gd" id="46_sqio2"] +[ext_resource type="Script" path="res://scene/ground/script/c03/s02_event_2d偷听陆仁小蝶对话后.gd" id="46_sqio2"] [sub_resource type="Animation" id="Animation_k01ve"] length = 0.001 diff --git a/scene/ground/scene/c03/s04_李癞房间.gd b/scene/ground/scene/c03/s04_李癞房间.gd index 21463fc3..9ae7deab 100644 --- a/scene/ground/scene/c03/s04_李癞房间.gd +++ b/scene/ground/scene/c03/s04_李癞房间.gd @@ -14,13 +14,32 @@ func _ready() -> void: #region node_reference +var closeup麻将出千游戏: Closeup2D +var closeup整理麻将游戏: Closeup2D #endregion # 读取设置变量名 func _setup_node_reference() -> void: - pass + closeup麻将出千游戏 = $"../DeployLayer/Closeup麻将出千游戏" + closeup整理麻将游戏 = $"../DeployLayer/Closeup整理麻将游戏" func _on_ground_ready() -> void: - pass + var stage = EventManager.get_stage("c03_mahjong_game") + closeup整理麻将游戏.enabled = stage == 0 + closeup麻将出千游戏.enabled = stage == 1 + closeup整理麻将游戏.exit.connect(_on_exit_sort_mahjong_game) + closeup麻将出千游戏.exit.connect(_on_exit_cheat_mahjong_game) + + +func _on_exit_sort_mahjong_game(arg) -> void: + if arg: + closeup整理麻将游戏.enabled = false + closeup麻将出千游戏.enabled = true + closeup麻将出千游戏.display() + + +func _on_exit_cheat_mahjong_game(arg) -> void: + if arg: + closeup麻将出千游戏.enabled = false diff --git a/scene/ground/scene/c03/s04_李癞房间.tscn b/scene/ground/scene/c03/s04_李癞房间.tscn index ced04133..16ca65f7 100644 --- a/scene/ground/scene/c03/s04_李癞房间.tscn +++ b/scene/ground/scene/c03/s04_李癞房间.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=3 uid="uid://c7c88hg2cl1j7"] +[gd_scene load_steps=14 format=3 uid="uid://c7c88hg2cl1j7"] [ext_resource type="PackedScene" uid="uid://dayyx4jerj7io" path="res://scene/ground/ground.tscn" id="1_byh4s"] [ext_resource type="Script" uid="uid://byw2swgt783oa" path="res://scene/ground/scene/c03/s04_李癞房间.gd" id="2_vjibx"] @@ -7,7 +7,8 @@ [ext_resource type="PackedScene" uid="uid://61pis75a8fdq" path="res://scene/entity/portal.tscn" id="5_4efpk"] [ext_resource type="Texture2D" uid="uid://bdtccpvbl7e7b" path="res://asset/art/scene/c03/s04_李癞房间/fg_李癞房间前景.png" id="5_vjibx"] [ext_resource type="PackedScene" uid="uid://dqkxiqbq83cmq" path="res://scene/entity/closeup.tscn" id="6_dbkw8"] -[ext_resource type="PackedScene" uid="uid://n75766ui6udi" path="res://scene/ground/script/c03/s04_closeup麻将游戏.tscn" id="7_jmyby"] +[ext_resource type="PackedScene" uid="uid://n75766ui6udi" path="res://scene/ground/script/c03/s04_closeup整理麻将游戏.tscn" id="7_jmyby"] +[ext_resource type="PackedScene" uid="uid://cua3uqy4btxqn" path="res://scene/ground/script/c03/s04_closeup麻将出千游戏.tscn" id="8_jmyby"] [sub_resource type="Animation" id="Animation_k01ve"] length = 0.001 @@ -147,8 +148,17 @@ position = Vector2(632, 30) debug_note = "通往院子" portal_name = "1" -[node name="Closeup麻将游戏" parent="Ground/DeployLayer" index="3" instance=ExtResource("6_dbkw8")] +[node name="Closeup整理麻将游戏" parent="Ground/DeployLayer" index="3" instance=ExtResource("6_dbkw8")] +unique_name_in_owner = true +position = Vector2(219, 63) packed_scene = ExtResource("7_jmyby") +quit_closeup_on_cancel = false + +[node name="Closeup麻将出千游戏" parent="Ground/DeployLayer" index="4" instance=ExtResource("6_dbkw8")] +unique_name_in_owner = true +position = Vector2(219, 63) +packed_scene = ExtResource("8_jmyby") +enabled = false [node name="MainPlayer" parent="Ground" index="5"] position = Vector2(63, 95) diff --git a/scene/ground/script/c03/s04_closeup麻将游戏.gd b/scene/ground/script/c03/s04_closeup整理麻将游戏.gd similarity index 74% rename from scene/ground/script/c03/s04_closeup麻将游戏.gd rename to scene/ground/script/c03/s04_closeup整理麻将游戏.gd index 43d09008..79560af7 100644 --- a/scene/ground/script/c03/s04_closeup麻将游戏.gd +++ b/scene/ground/script/c03/s04_closeup整理麻将游戏.gd @@ -1,35 +1,40 @@ extends CanvasLayer +signal exit(success: bool) + @onready var bg = $BG as TextureRect var mahjongs = { - "三条1": preload("uid://b2ectbek7vksi"), - "三条2": preload("uid://ca5j182ppemi3"), - "三条3": preload("uid://cd6d3xjx5o6gg"), - "三条4": preload("uid://bl20arldcd04c"), - "三条5": preload("uid://dtkl36brvsget"), + "三条": preload("uid://b2ectbek7vksi"), "三筒": preload("uid://b2pypf81rgqkw"), - "九筒1": preload("uid://dis6qtf1hvop2"), - "九筒2": preload("uid://2chok0puqbuu"), + "九筒": preload("uid://dis6qtf1hvop2"), "二筒": preload("uid://doxc87cp3e8i4"), - "伍万1": preload("uid://bo4hrg3sqpoou"), - "伍万2": preload("uid://e86x6j8wu7sw"), - "伍万3": preload("uid://q4vs78ohnnhw"), + "伍万": preload("uid://bo4hrg3sqpoou"), "一条": preload("uid://dduhqah1p81tb"), "一筒": preload("uid://dwyk0e1c2eg37") } +var answer_of_in_hand_mahjongs = { + preload("uid://bo4hrg3sqpoou"): "伍万", + preload("uid://b2ectbek7vksi"): "三条" +} + @onready var box_init_btn = %"0" @onready var box_mahjongs_btn: Array[TextureButton] = [%"1", %"2", %"3", %"4", %"5", %"6", %"7", %"8", %"9", %"10", %"11"] -@onready var hand_mahjongs_btn: Array[TextureButton] = [%"12", %"13", %"14"] -@onready var hand_mahjongs = [] -@onready var box_mahjongs = [] +@onready var hand_mahjongs_btn: Array[TextureButton] = [%"12", %"13"] var freezing = true var success = false func _ready() -> void: layer = GlobalConfig.CANVAS_LAYER_LITTLE_GAME + _toggle_activation_for_all(false) + if not SceneManager.has_prop("prop_麻将2"): + %"12".visible = false + SceneManager.pop_center_notification("input_麻将游戏_麻将不足") + await Util.wait(3.0) + exit.emit(false) + return box_init_btn.pressed.connect(_start_game) box_init_btn.mouse_entered.connect(_toggle_activation_modulate.bind(box_init_btn, true)) box_init_btn.mouse_exited.connect(_toggle_activation_modulate.bind(box_init_btn, false)) @@ -41,12 +46,11 @@ func _ready() -> void: b.mouse_entered.connect(_toggel_hover.bind(b, true)) b.mouse_exited.connect(_toggel_hover.bind(b, false)) b.pressed.connect(_on_btn_pressed.bind(b)) - _toggle_activation_for_all(false) func _start_game() -> void: $SfxStart.play() - %"14".visible = true + SceneManager.pop_center_notification("input_麻将游戏_操作规则") box_init_btn.queue_free() freezing = false @@ -92,10 +96,7 @@ func _exchange_texture(btn1: TextureButton, btn2: TextureButton) -> void: func _toggle_activation_modulate(btn: TextureButton, activated: bool) -> void: if null == btn: return - if activated: - btn.modulate = Color.WHITE - else: - btn.modulate = Color.GRAY + btn.get_node("光束").enabled = activated func _toggle_activation_for_all(activated: bool) -> void: @@ -108,7 +109,18 @@ func _toggle_activation_for_all(activated: bool) -> void: func _check_if_success() -> void: + success = true + for hb in hand_mahjongs_btn: + if not hb.texture_normal in answer_of_in_hand_mahjongs: + success = false + break if success: $SfxSuccess.play() freezing = true - \ No newline at end of file + SceneManager.disable_prop_item("prop_麻将") + SceneManager.disable_prop_item("prop_麻将2") + # 下一阶段 + EventManager.set_stage_if_greater("c03_mahjong_game", 1) + await Util.wait(3.0) + exit.emit(true) + diff --git a/scene/ground/script/c03/s04_closeup麻将游戏.gd.uid b/scene/ground/script/c03/s04_closeup整理麻将游戏.gd.uid similarity index 100% rename from scene/ground/script/c03/s04_closeup麻将游戏.gd.uid rename to scene/ground/script/c03/s04_closeup整理麻将游戏.gd.uid diff --git a/scene/ground/script/c03/s04_closeup麻将游戏.tscn b/scene/ground/script/c03/s04_closeup整理麻将游戏.tscn similarity index 60% rename from scene/ground/script/c03/s04_closeup麻将游戏.tscn rename to scene/ground/script/c03/s04_closeup整理麻将游戏.tscn index aea3b0e0..ba13f88b 100644 --- a/scene/ground/script/c03/s04_closeup麻将游戏.tscn +++ b/scene/ground/script/c03/s04_closeup整理麻将游戏.tscn @@ -1,32 +1,36 @@ -[gd_scene load_steps=19 format=3 uid="uid://n75766ui6udi"] +[gd_scene load_steps=20 format=3 uid="uid://n75766ui6udi"] -[ext_resource type="Script" uid="uid://5r8bu30xpb6m" path="res://scene/ground/script/c03/s04_closeup麻将游戏.gd" id="1_npctd"] +[ext_resource type="Script" uid="uid://5r8bu30xpb6m" path="res://scene/ground/script/c03/s04_closeup整理麻将游戏.gd" id="1_npctd"] [ext_resource type="AudioStream" uid="uid://cj2wd18uh67sc" path="res://asset/audio/effect/casino/chipLay2.ogg" id="2_oafpr"] [ext_resource type="AudioStream" uid="uid://bki553kyllb1k" path="res://asset/audio/effect/casino/chipsHandle4.ogg" id="2_oarv7"] [ext_resource type="Texture2D" uid="uid://6q05kftuxauv" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/麻将游戏盒子特写.png" id="3_f6p4s"] [ext_resource type="Script" uid="uid://rq6w1vuhuq1m" path="res://scene/entity/audio/sfx.gd" id="3_oarv7"] -[ext_resource type="Texture2D" uid="uid://b2ectbek7vksi" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条1.png" id="4_axqt4"] +[ext_resource type="Texture2D" uid="uid://b2ectbek7vksi" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条.png" id="4_axqt4"] [ext_resource type="AudioStream" uid="uid://cyh1ynixo2li" path="res://asset/audio/effect/casino/chipLay3.ogg" id="4_ta1cv"] -[ext_resource type="Texture2D" uid="uid://ca5j182ppemi3" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条2.png" id="5_ib3cx"] [ext_resource type="AudioStream" uid="uid://dxh48r32lm7p2" path="res://asset/audio/effect/casino/chipsHandle5.ogg" id="5_ivruk"] -[ext_resource type="Texture2D" uid="uid://bl20arldcd04c" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三条4.png" id="6_fwi83"] -[ext_resource type="Texture2D" uid="uid://dis6qtf1hvop2" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒1.png" id="7_f6p4s"] +[ext_resource type="Texture2D" uid="uid://dis6qtf1hvop2" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/九筒.png" id="7_f6p4s"] [ext_resource type="Texture2D" uid="uid://y15vgb2gq2r3" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/手.png" id="7_rp00l"] [ext_resource type="Texture2D" uid="uid://tdo5xxovhljp" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/麻将游戏桌面背景.png" id="7_ta1cv"] [ext_resource type="Texture2D" uid="uid://b2pypf81rgqkw" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/三筒.png" id="8_ib3cx"] -[ext_resource type="Texture2D" uid="uid://bo4hrg3sqpoou" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万1.png" id="9_axqt4"] +[ext_resource type="Texture2D" uid="uid://bo4hrg3sqpoou" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/伍万.png" id="9_axqt4"] +[ext_resource type="Texture2D" uid="uid://dduhqah1p81tb" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/初始一条.png" id="15_ta1cv"] +[ext_resource type="Texture2D" uid="uid://dwyk0e1c2eg37" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/初始一筒.png" id="16_8hre4"] [ext_resource type="Texture2D" uid="uid://bsqp5gfgplgrv" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/麻将整理游戏视觉引导光影.png" id="16_ivruk"] +[ext_resource type="Texture2D" uid="uid://doxc87cp3e8i4" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/二筒.png" id="17_b56iy"] [sub_resource type="Gradient" id="Gradient_oarv7"] -offsets = PackedFloat32Array(1) -colors = PackedColorArray(1, 1, 1, 1) +offsets = PackedFloat32Array(0, 0.78811, 1) +colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0) [sub_resource type="GradientTexture2D" id="GradientTexture2D_ta1cv"] gradient = SubResource("Gradient_oarv7") -width = 30 -height = 30 +width = 90 +height = 72 +fill = 2 +fill_from = Vector2(0.5, 0.5) +fill_to = Vector2(1, 1) -[node name="Closeup麻将游戏" type="CanvasLayer"] +[node name="Closeup整理麻将游戏" type="CanvasLayer"] script = ExtResource("1_npctd") [node name="SfxStart" type="AudioStreamPlayer" parent="."] @@ -85,72 +89,128 @@ columns = 3 unique_name_in_owner = true custom_minimum_size = Vector2(20, 14) layout_mode = 2 -texture_normal = ExtResource("6_fwi83") +texture_normal = ExtResource("9_axqt4") ignore_texture_size = true -[node name="PointLight2D" type="PointLight2D" parent="Box/Right/1"] -position = Vector2(12, 7) -energy = 0.2 -range_layer_min = 1 -range_layer_max = 1 +[node name="光束" type="PointLight2D" parent="Box/Right/1"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 texture = SubResource("GradientTexture2D_ta1cv") [node name="2" type="TextureButton" parent="Box/Right"] unique_name_in_owner = true custom_minimum_size = Vector2(20, 14) layout_mode = 2 -texture_normal = ExtResource("6_fwi83") +texture_normal = ExtResource("4_axqt4") ignore_texture_size = true +[node name="光束" type="PointLight2D" parent="Box/Right/2"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 +texture = SubResource("GradientTexture2D_ta1cv") + [node name="3" type="TextureButton" parent="Box/Right"] unique_name_in_owner = true custom_minimum_size = Vector2(20, 14) layout_mode = 2 -texture_normal = ExtResource("6_fwi83") +texture_normal = ExtResource("4_axqt4") ignore_texture_size = true +[node name="光束" type="PointLight2D" parent="Box/Right/3"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 +texture = SubResource("GradientTexture2D_ta1cv") + [node name="4" type="TextureButton" parent="Box/Right"] unique_name_in_owner = true custom_minimum_size = Vector2(20, 14) layout_mode = 2 -texture_normal = ExtResource("7_f6p4s") +texture_normal = ExtResource("17_b56iy") ignore_texture_size = true +[node name="光束" type="PointLight2D" parent="Box/Right/4"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 +texture = SubResource("GradientTexture2D_ta1cv") + [node name="5" type="TextureButton" parent="Box/Right"] unique_name_in_owner = true custom_minimum_size = Vector2(20, 14) layout_mode = 2 -texture_normal = ExtResource("6_fwi83") +texture_normal = ExtResource("4_axqt4") ignore_texture_size = true +[node name="光束" type="PointLight2D" parent="Box/Right/5"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 +texture = SubResource("GradientTexture2D_ta1cv") + [node name="6" type="TextureButton" parent="Box/Right"] unique_name_in_owner = true custom_minimum_size = Vector2(20, 14) layout_mode = 2 -texture_normal = ExtResource("6_fwi83") +texture_normal = ExtResource("4_axqt4") ignore_texture_size = true +[node name="光束" type="PointLight2D" parent="Box/Right/6"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 +texture = SubResource("GradientTexture2D_ta1cv") + [node name="7" type="TextureButton" parent="Box/Right"] unique_name_in_owner = true custom_minimum_size = Vector2(20, 20) layout_mode = 2 -texture_normal = ExtResource("6_fwi83") +texture_normal = ExtResource("9_axqt4") ignore_texture_size = true +[node name="光束" type="PointLight2D" parent="Box/Right/7"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 +texture = SubResource("GradientTexture2D_ta1cv") + [node name="8" type="TextureButton" parent="Box/Right"] unique_name_in_owner = true custom_minimum_size = Vector2(20, 20) layout_mode = 2 -texture_normal = ExtResource("6_fwi83") +texture_normal = ExtResource("9_axqt4") ignore_texture_size = true +[node name="光束" type="PointLight2D" parent="Box/Right/8"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 +texture = SubResource("GradientTexture2D_ta1cv") + [node name="9" type="TextureButton" parent="Box/Right"] unique_name_in_owner = true custom_minimum_size = Vector2(20, 20) layout_mode = 2 -texture_normal = ExtResource("6_fwi83") +texture_normal = ExtResource("7_f6p4s") ignore_texture_size = true +[node name="光束" type="PointLight2D" parent="Box/Right/9"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 +texture = SubResource("GradientTexture2D_ta1cv") + [node name="Left" type="GridContainer" parent="Box"] layout_mode = 0 offset_left = 241.0 @@ -164,12 +224,26 @@ columns = 2 [node name="10" type="TextureButton" parent="Box/Left"] unique_name_in_owner = true layout_mode = 2 -texture_normal = ExtResource("4_axqt4") +texture_normal = ExtResource("7_f6p4s") + +[node name="光束" type="PointLight2D" parent="Box/Left/10"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 +texture = SubResource("GradientTexture2D_ta1cv") [node name="11" type="TextureButton" parent="Box/Left"] unique_name_in_owner = true layout_mode = 2 -texture_normal = ExtResource("5_ib3cx") +texture_normal = ExtResource("4_axqt4") + +[node name="光束" type="PointLight2D" parent="Box/Left/11"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 +texture = SubResource("GradientTexture2D_ta1cv") [node name="0" type="TextureButton" parent="Box"] unique_name_in_owner = true @@ -180,16 +254,23 @@ offset_right = 341.0 offset_bottom = 234.0 texture_normal = ExtResource("8_ib3cx") +[node name="光束" type="PointLight2D" parent="Box/0"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 +texture = SubResource("GradientTexture2D_ta1cv") + [node name="Hand" type="TextureRect" parent="."] anchors_preset = 7 anchor_left = 0.5 anchor_top = 1.0 anchor_right = 0.5 anchor_bottom = 1.0 -offset_left = -207.0 -offset_top = -156.0 -offset_right = -95.0 -offset_bottom = -9.0 +offset_left = -217.0 +offset_top = -153.0 +offset_right = -105.0 +offset_bottom = -6.0 grow_horizontal = 2 grow_vertical = 0 mouse_filter = 0 @@ -199,33 +280,36 @@ stretch_mode = 3 [node name="12" type="TextureButton" parent="Hand"] unique_name_in_owner = true layout_mode = 0 -offset_left = 43.0 -offset_top = 58.0 -offset_right = 65.0 -offset_bottom = 78.0 +offset_left = 41.0561 +offset_top = 60.0 +offset_right = 63.0561 +offset_bottom = 80.0 rotation = 1.26235 -texture_normal = ExtResource("9_axqt4") +texture_normal = ExtResource("15_ta1cv") + +[node name="光束" type="PointLight2D" parent="Hand/12"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 +texture = SubResource("GradientTexture2D_ta1cv") [node name="13" type="TextureButton" parent="Hand"] unique_name_in_owner = true layout_mode = 0 -offset_left = 66.0 -offset_top = 70.0 -offset_right = 88.0 -offset_bottom = 90.0 +offset_left = 64.0561 +offset_top = 72.0 +offset_right = 86.0561 +offset_bottom = 92.0 rotation = 0.943099 -texture_normal = ExtResource("9_axqt4") +texture_normal = ExtResource("16_8hre4") -[node name="14" type="TextureButton" parent="Hand"] -unique_name_in_owner = true -visible = false -layout_mode = 0 -offset_left = 42.0 -offset_top = 86.0 -offset_right = 64.0 -offset_bottom = 106.0 -rotation = 0.691136 -texture_normal = ExtResource("9_axqt4") +[node name="光束" type="PointLight2D" parent="Hand/13"] +position = Vector2(11, 8) +scale = Vector2(0.25, 0.25) +energy = 0.3 +range_layer_max = 10 +texture = SubResource("GradientTexture2D_ta1cv") [node name="遮罩" type="TextureRect" parent="."] anchors_preset = 15 diff --git a/scene/ground/script/c03/s04_closeup麻将出千游戏.gd b/scene/ground/script/c03/s04_closeup麻将出千游戏.gd new file mode 100644 index 00000000..fe62835b --- /dev/null +++ b/scene/ground/script/c03/s04_closeup麻将出千游戏.gd @@ -0,0 +1,8 @@ +extends CanvasLayer + +signal exit(arg) + +@onready var bg = $BG as TextureRect + +func _ready() -> void: + layer = GlobalConfig.CANVAS_LAYER_LITTLE_GAME diff --git a/scene/ground/script/c03/s04_closeup麻将出千游戏.gd.uid b/scene/ground/script/c03/s04_closeup麻将出千游戏.gd.uid new file mode 100644 index 00000000..eaf1f4ac --- /dev/null +++ b/scene/ground/script/c03/s04_closeup麻将出千游戏.gd.uid @@ -0,0 +1 @@ +uid://6ns5o344dgfo diff --git a/scene/ground/script/c03/s04_closeup麻将出千游戏.tscn b/scene/ground/script/c03/s04_closeup麻将出千游戏.tscn new file mode 100644 index 00000000..84700fe2 --- /dev/null +++ b/scene/ground/script/c03/s04_closeup麻将出千游戏.tscn @@ -0,0 +1,41 @@ +[gd_scene load_steps=5 format=3 uid="uid://cua3uqy4btxqn"] + +[ext_resource type="Script" uid="uid://6ns5o344dgfo" path="res://scene/ground/script/c03/s04_closeup麻将出千游戏.gd" id="1_svv4b"] +[ext_resource type="Texture2D" uid="uid://tdo5xxovhljp" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/麻将游戏桌面背景.png" id="2_a527u"] +[ext_resource type="Texture2D" uid="uid://cbql1i4hblmt1" path="res://asset/art/ui/遮罩/inspect特写通用遮罩.png" id="2_dgp1q"] +[ext_resource type="Texture2D" uid="uid://y15vgb2gq2r3" path="res://asset/art/scene/c03/s04_李癞房间/麻将游戏整理/手.png" id="3_k8d28"] + +[node name="Closeup麻将出千游戏" type="CanvasLayer"] +script = ExtResource("1_svv4b") + +[node name="BG" type="TextureRect" parent="."] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 0 +texture = ExtResource("2_a527u") + +[node name="BG2" type="TextureRect" parent="."] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 3.0 +offset_top = 26.0 +offset_right = 3.0 +offset_bottom = 26.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 0 +texture = ExtResource("3_k8d28") +stretch_mode = 3 + +[node name="遮罩" type="TextureRect" parent="."] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +texture = ExtResource("2_dgp1q")