From b0c01cfca0f1b27f1abc20ff1a977febb7bf0dd2 Mon Sep 17 00:00:00 2001 From: Cold-Mint Date: Fri, 19 Jul 2024 21:12:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E5=AF=BC=E8=88=AA=E7=BD=91?= =?UTF-8?q?=E6=A0=BC=E4=B8=AD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/levelGraphs/test.yaml | 32 ++-- scripts/loader/sceneLoader/GameSceneLoader.cs | 148 +++++++------- scripts/loader/uiLoader/SplashScreenLoader.cs | 180 +++++++++--------- scripts/map/dateBean/RoomPlacementData.cs | 9 +- scripts/map/dateBean/RoomSlot.cs | 26 +++ scripts/map/room/Room.cs | 2 + .../PatchworkRoomPlacementStrategy.cs | 32 +++- 7 files changed, 243 insertions(+), 186 deletions(-) diff --git a/data/levelGraphs/test.yaml b/data/levelGraphs/test.yaml index b3b1f4f..da1d6b5 100644 --- a/data/levelGraphs/test.yaml +++ b/data/levelGraphs/test.yaml @@ -3,22 +3,22 @@ connection_data_list: to_id: 4ae948ea-82b7-4b2d-bec2-19ed8a9d4c03 from_port: 0 to_port: 0 - - from_id: 4ae948ea-82b7-4b2d-bec2-19ed8a9d4c03 - to_id: ba32e05c-0c80-4a79-b5ce-5b8150400e05 - from_port: 0 - to_port: 0 - - from_id: 4ae948ea-82b7-4b2d-bec2-19ed8a9d4c03 - to_id: 8b3d645a-96c0-407e-871d-6f4a0b69557b - from_port: 0 - to_port: 0 - - from_id: 8b3d645a-96c0-407e-871d-6f4a0b69557b - to_id: 7e3ae680-3d7e-4ae9-b82f-5bfbe1c2f613 - from_port: 0 - to_port: 0 - - from_id: ba32e05c-0c80-4a79-b5ce-5b8150400e05 - to_id: 7e3ae680-3d7e-4ae9-b82f-5bfbe1c2f613 - from_port: 0 - to_port: 0 +# - from_id: 4ae948ea-82b7-4b2d-bec2-19ed8a9d4c03 +# to_id: ba32e05c-0c80-4a79-b5ce-5b8150400e05 +# from_port: 0 +# to_port: 0 +# - from_id: 4ae948ea-82b7-4b2d-bec2-19ed8a9d4c03 +# to_id: 8b3d645a-96c0-407e-871d-6f4a0b69557b +# from_port: 0 +# to_port: 0 +# - from_id: 8b3d645a-96c0-407e-871d-6f4a0b69557b +# to_id: 7e3ae680-3d7e-4ae9-b82f-5bfbe1c2f613 +# from_port: 0 +# to_port: 0 +# - from_id: ba32e05c-0c80-4a79-b5ce-5b8150400e05 +# to_id: 7e3ae680-3d7e-4ae9-b82f-5bfbe1c2f613 +# from_port: 0 +# to_port: 0 room_node_data_list: - id: c0255eb6-2c75-44f7-9058-0921fe8fb0d8 title: 起点房间 diff --git a/scripts/loader/sceneLoader/GameSceneLoader.cs b/scripts/loader/sceneLoader/GameSceneLoader.cs index f433c7d..8d1d4b3 100644 --- a/scripts/loader/sceneLoader/GameSceneLoader.cs +++ b/scripts/loader/sceneLoader/GameSceneLoader.cs @@ -15,82 +15,82 @@ namespace ColdMint.scripts.loader.sceneLoader; /// public partial class GameSceneLoader : SceneLoaderTemplate { - private Label? _seedLabel; + private Label? _seedLabel; - public override Task InitializeData() - { - //Loading the blood bar scene - //加载血条场景 - var healthBarUi = GetNode("CanvasLayer/Control/VBoxContainer/HealthBarUi"); - GameSceneNodeHolder.HealthBarUi = healthBarUi; - //Load HotBar - //加载HotBar - var hotBar = GetNode("CanvasLayer/Control/VBoxContainer/HotBar"); - GameSceneNodeHolder.HotBar = hotBar; - //Backpack Ui container - //背包Ui容器 - var backpackUiContainer = GetNode("CanvasLayer/BackpackUIContainer"); - GameSceneNodeHolder.BackpackUiContainer = backpackUiContainer; - //Load operation prompt - //加载操作提示 - var operationTip = GetNode("CanvasLayer/Control/VBoxContainer/OperationTip"); - GameSceneNodeHolder.OperationTipLabel = operationTip; - //Loaded weapon container - //加载武器容器 - var weaponContainer = GetNode("WeaponContainer"); - GameSceneNodeHolder.WeaponContainer = weaponContainer; - //Load Packsack container - //加载背包容器 - var packsackContainer = GetNode("PacksackContainer"); - GameSceneNodeHolder.PacksackContainer = packsackContainer; - //Load AICharacter container - //加载AICharacter容器 - var aiCharacterContainer = GetNode("AICharacterContainer"); - GameSceneNodeHolder.AiCharacterContainer = aiCharacterContainer; - //Load player container - //加载玩家容器 - var playerContainer = GetNode("PlayerContainer"); - GameSceneNodeHolder.PlayerContainer = playerContainer; - return Task.CompletedTask; - } + public override Task InitializeData() + { + //Loading the blood bar scene + //加载血条场景 + var healthBarUi = GetNode("CanvasLayer/Control/VBoxContainer/HealthBarUi"); + GameSceneNodeHolder.HealthBarUi = healthBarUi; + //Load HotBar + //加载HotBar + var hotBar = GetNode("CanvasLayer/Control/VBoxContainer/HotBar"); + GameSceneNodeHolder.HotBar = hotBar; + //Backpack Ui container + //背包Ui容器 + var backpackUiContainer = GetNode("CanvasLayer/BackpackUIContainer"); + GameSceneNodeHolder.BackpackUiContainer = backpackUiContainer; + //Load operation prompt + //加载操作提示 + var operationTip = GetNode("CanvasLayer/Control/VBoxContainer/OperationTip"); + GameSceneNodeHolder.OperationTipLabel = operationTip; + //Loaded weapon container + //加载武器容器 + var weaponContainer = GetNode("WeaponContainer"); + GameSceneNodeHolder.WeaponContainer = weaponContainer; + //Load Packsack container + //加载背包容器 + var packsackContainer = GetNode("PacksackContainer"); + GameSceneNodeHolder.PacksackContainer = packsackContainer; + //Load AICharacter container + //加载AICharacter容器 + var aiCharacterContainer = GetNode("AICharacterContainer"); + GameSceneNodeHolder.AiCharacterContainer = aiCharacterContainer; + //Load player container + //加载玩家容器 + var playerContainer = GetNode("PlayerContainer"); + GameSceneNodeHolder.PlayerContainer = playerContainer; + return Task.CompletedTask; + } - public override async Task LoadScene() - { - var debugMode = Config.IsDebug(); - var recreateMapButton = GetNodeOrNull