diff --git a/data/levelGraphs/test.json b/data/levelGraphs/test.json index 4682698..607ecf0 100644 --- a/data/levelGraphs/test.json +++ b/data/levelGraphs/test.json @@ -5,6 +5,36 @@ "ToId": "4ae948ea-82b7-4b2d-bec2-19ed8a9d4c03", "FromPort": 0, "ToPort": 0 + }, + { + "FromId": "4ae948ea-82b7-4b2d-bec2-19ed8a9d4c03", + "ToId": "9d764cca-5057-470a-976d-ba472a21e2cc", + "FromPort": 0, + "ToPort": 0 + }, + { + "FromId": "9d764cca-5057-470a-976d-ba472a21e2cc", + "ToId": "08c9d2be-6174-4efe-91fc-e1b205c4dd53", + "FromPort": 0, + "ToPort": 0 + }, + { + "FromId": "08c9d2be-6174-4efe-91fc-e1b205c4dd53", + "ToId": "55d2ef86-49d0-4f8c-9f06-286673a5e1da", + "FromPort": 0, + "ToPort": 0 + }, + { + "FromId": "55d2ef86-49d0-4f8c-9f06-286673a5e1da", + "ToId": "07cc5f19-df5c-44aa-9997-81e48f4e2c4e", + "FromPort": 0, + "ToPort": 0 + }, + { + "FromId": "07cc5f19-df5c-44aa-9997-81e48f4e2c4e", + "ToId": "ea62a8ef-5575-4259-814a-b3454ff688f5", + "FromPort": 0, + "ToPort": 0 } ], "RoomNodeDataList": [ @@ -19,6 +49,51 @@ "StartingRoom" ] }, + { + "Id": "9d764cca-5057-470a-976d-ba472a21e2cc", + "Title": "房间3", + "Description": "", + "RoomTemplateSet": [ + "res://prefab/roomTemplates/dungeon" + ], + "Tags": null + }, + { + "Id": "08c9d2be-6174-4efe-91fc-e1b205c4dd53", + "Title": "房间4", + "Description": "", + "RoomTemplateSet": [ + "res://prefab/roomTemplates/dungeon" + ], + "Tags": null + }, + { + "Id": "55d2ef86-49d0-4f8c-9f06-286673a5e1da", + "Title": "房间5", + "Description": "", + "RoomTemplateSet": [ + "res://prefab/roomTemplates/dungeon" + ], + "Tags": null + }, + { + "Id": "ea62a8ef-5575-4259-814a-b3454ff688f5", + "Title": "房间7", + "Description": "", + "RoomTemplateSet": [ + "res://prefab/roomTemplates/dungeon" + ], + "Tags": null + }, + { + "Id": "07cc5f19-df5c-44aa-9997-81e48f4e2c4e", + "Title": "房间6", + "Description": "", + "RoomTemplateSet": [ + "res://prefab/roomTemplates/dungeon" + ], + "Tags": null + }, { "Id": "4ae948ea-82b7-4b2d-bec2-19ed8a9d4c03", "Title": "大厅", diff --git a/locals/UI.csv b/locals/UI.csv index f955582..226051c 100644 --- a/locals/UI.csv +++ b/locals/UI.csv @@ -27,4 +27,5 @@ save,保存,Save,保留 filename,文件名,File name,ファイル名 cancel,取消,Cancel,キャンセル load,加载,Load,ろーど -delete_selected_node,删除选中的节点,Delete selected node,選択されたノードを削除します \ No newline at end of file +delete_selected_node,删除选中的节点,Delete selected node,選択されたノードを削除します +re_create_map,重新创建地图,Re-create map,地図を再作成します \ No newline at end of file diff --git a/locals/UI.en.translation b/locals/UI.en.translation index 70adeb1..f3610dc 100644 Binary files a/locals/UI.en.translation and b/locals/UI.en.translation differ diff --git a/locals/UI.jp.translation b/locals/UI.jp.translation index 44b20fa..7d3cd2f 100644 Binary files a/locals/UI.jp.translation and b/locals/UI.jp.translation differ diff --git a/locals/UI.zh.translation b/locals/UI.zh.translation index 049cfd9..2f83397 100644 Binary files a/locals/UI.zh.translation and b/locals/UI.zh.translation differ diff --git a/scenes/game.tscn b/scenes/game.tscn index b4f4b30..9cc189b 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -67,6 +67,22 @@ grow_horizontal = 0 horizontal_alignment = 2 script = ExtResource("5_dis4v") +[node name="RecreateMapButton" type="Button" parent="CanvasLayer/Control"] +layout_mode = 0 +offset_right = 8.0 +offset_bottom = 8.0 +text = "re_create_map" + +[node name="SeedLabel" type="Label" parent="CanvasLayer/Control"] +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -20.0 +offset_right = 20.0 +offset_bottom = 25.0 +grow_horizontal = 2 + [node name="ProjectileContainer" type="Node2D" parent="."] [node name="DamageNumberContainer" type="Node2D" parent="."] diff --git a/scripts/loader/sceneLoader/GameSceneLoader.cs b/scripts/loader/sceneLoader/GameSceneLoader.cs index 6179586..933ecf1 100644 --- a/scripts/loader/sceneLoader/GameSceneLoader.cs +++ b/scripts/loader/sceneLoader/GameSceneLoader.cs @@ -11,6 +11,8 @@ namespace ColdMint.scripts.loader.sceneLoader; public partial class GameSceneLoader : SceneLoaderTemplate { + private Label? _seedLabel; + public override Task InitializeData() { //加载血条场景 @@ -30,14 +32,41 @@ public partial class GameSceneLoader : SceneLoaderTemplate public override async Task LoadScene() { + var debugMode = Config.IsDebug(); + var recreateMapButton = GetNodeOrNull