From e8ee2932bb5aee80ce8396d3e0c65bae5eff0b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=A8=E8=90=BD=E5=9F=BA=E5=9B=B4=E8=99=BE?= <3161880837@qq.com> Date: Mon, 4 May 2026 18:14:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B8=B8=E6=88=8F=E6=9C=BA=E5=88=B6):=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8E=89=E8=90=BD=E7=89=A9=E5=93=81=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E5=92=8C=E6=B7=BB=E5=8A=A0=E9=94=99=E8=AF=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加boss和非boss敌人死亡时掉落水晶的数量范围 为武器镶嵌/移除灵魂操作添加错误提示 移除Starter场景中不必要的属性设置 新增CharacterCardBase基础组件 --- components/Abstracts/CharacterCardBase.tscn | 44 +++++++++++++++++++ .../Scenes/FullscreenPanels/Starter.tscn | 2 - scripts/Statemachine/EntityBase.gd | 2 +- scripts/Structs/Weapon.gd | 6 +++ 4 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 components/Abstracts/CharacterCardBase.tscn diff --git a/components/Abstracts/CharacterCardBase.tscn b/components/Abstracts/CharacterCardBase.tscn new file mode 100644 index 0000000..1740d35 --- /dev/null +++ b/components/Abstracts/CharacterCardBase.tscn @@ -0,0 +1,44 @@ +[gd_scene format=3 uid="uid://m8a4nay1pmmg"] + +[ext_resource type="Texture2D" uid="uid://dwwpkn4q07ja2" path="res://icon.svg" id="1_5td0u"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dt83t"] +content_margin_left = 20.0 +content_margin_top = 20.0 +content_margin_right = 20.0 +content_margin_bottom = 20.0 +bg_color = Color(0, 0, 0, 0.70000005) +border_width_top = 10 +border_width_bottom = 10 +border_color = Color(1, 1, 1, 1) +border_blend = true +corner_radius_top_left = 15 +corner_radius_bottom_right = 15 +corner_detail = 1 + +[node name="CharacterCardBase" type="Control" unique_id=2051062087] +layout_mode = 3 +anchors_preset = 0 +offset_right = 200.0 +offset_bottom = 300.0 + +[node name="panel" type="PanelContainer" parent="." unique_id=1046363300] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_dt83t") + +[node name="wrapper" type="VBoxContainer" parent="panel" unique_id=2023039659] +layout_mode = 2 + +[node name="TextureRect" type="TextureRect" parent="panel/wrapper" unique_id=1334645594] +custom_minimum_size = Vector2(100, 100) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("1_5td0u") +expand_mode = 1 +stretch_mode = 5 diff --git a/components/Scenes/FullscreenPanels/Starter.tscn b/components/Scenes/FullscreenPanels/Starter.tscn index 929932b..fdb8bb4 100644 --- a/components/Scenes/FullscreenPanels/Starter.tscn +++ b/components/Scenes/FullscreenPanels/Starter.tscn @@ -243,7 +243,6 @@ theme_override_constants/separation = 6 [node name="diffs" type="HBoxContainer" parent="content/wrapper/layout/startGameWrapper/start/starter/singleplayer/playConfig" index="0" unique_id=526058063] layout_mode = 2 -alignment = 1 [node name="tip" type="Label" parent="content/wrapper/layout/startGameWrapper/start/starter/singleplayer/playConfig/diffs" index="0" unique_id=1507689450] layout_mode = 2 @@ -338,7 +337,6 @@ theme = ExtResource("4_lfxcn") text = "多人游戏" [node name="multiplayer" type="VBoxContainer" parent="content/wrapper/layout/startGameWrapper/start/starter" index="1" unique_id=2010516457] -visible = false layout_mode = 2 theme_override_constants/separation = 15 alignment = 1 diff --git a/scripts/Statemachine/EntityBase.gd b/scripts/Statemachine/EntityBase.gd index d492991..d6aca10 100644 --- a/scripts/Statemachine/EntityBase.gd +++ b/scripts/Statemachine/EntityBase.gd @@ -419,7 +419,7 @@ func tryDie(by: BulletBase = null): fields[FieldStore.Entity.MAX_HEALTH] * randf_range(1 - GameRule.beachballOffset, 1 + GameRule.beachballOffset), position + MathTool.sampleInCircle(GameRule.itemDroppedSpawnOffset) ) - for i in randi_range(0, 10 if isBoss else 3): + for i in randi_range(0, 20 if isBoss else 5): ItemDropped.generate( ItemStore.ItemType.CRYSTAL, 5 if isBoss else 1, diff --git a/scripts/Structs/Weapon.gd b/scripts/Structs/Weapon.gd index 324a9e1..bf87b80 100644 --- a/scripts/Structs/Weapon.gd +++ b/scripts/Structs/Weapon.gd @@ -87,6 +87,8 @@ func _ready(): soulLevel -= 1 updateStore(level, UIState.player) rebuildInfo() + else: + UIState.showTip("[b]%s[/b]还未镶嵌任何灵魂!" % displayName, TipBox.MessageType.ERROR) ) inlayBtn.pressed.connect( func(): @@ -97,6 +99,10 @@ func _ready(): soulLevel += 1 updateStore(level, UIState.player) rebuildInfo() + else: + UIState.showTip("持有的灵魂数量不足!", TipBox.MessageType.ERROR) + else: + UIState.showTip("[b]%s[/b]的灵魂槽位已满!" % displayName, TipBox.MessageType.ERROR) ) moveLeftBtn.pressed.connect( func():