From cedb79faf3ea56e9b42a8c7b1b4e55c864ccab4e 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: Sat, 28 Mar 2026 10:40:59 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=B0=83=E6=95=B4=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E9=85=8D=E7=BD=AE=E5=92=8C=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新多个游戏组件的配置参数和资源引用: 1. 修改武器树的攻击速率和调试标记 2. 调整伤害标签的生成偏移量 3. 更新波次数据和初始波次设置 4. 替换Kernyr角色的贴图并调整碰撞体大小 5. 修改阳毅导弹的显示名称 --- components/Bullets/Yangyi.tscn | 2 +- components/Characters/Kernyr.tscn | 10 ++++++---- components/Weapons/Tree.tscn | 3 ++- scripts/Contents/Wave.gd | 4 ++-- scripts/Tools/GameRule.gd | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/components/Bullets/Yangyi.tscn b/components/Bullets/Yangyi.tscn index c407208..76438b1 100644 --- a/components/Bullets/Yangyi.tscn +++ b/components/Bullets/Yangyi.tscn @@ -76,7 +76,7 @@ alpha_curve = SubResource("CurveTexture_peenw") [node name="Yangyi" instance=ExtResource("1_i51w8")] script = ExtResource("2_sku1m") -displayName = "超级阳毅导弹" +displayName = "超级铅笔" speed = 20.0 lifeTime = 3000.0 autoLoopAnimation = true diff --git a/components/Characters/Kernyr.tscn b/components/Characters/Kernyr.tscn index 50063ae..43ae601 100644 --- a/components/Characters/Kernyr.tscn +++ b/components/Characters/Kernyr.tscn @@ -2,7 +2,7 @@ [ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_bha5j"] [ext_resource type="Script" uid="uid://m28dwfwmmhmh" path="res://scripts/Contents/Characters/Kernyr.gd" id="2_vkls3"] -[ext_resource type="Texture2D" uid="uid://7pkplcqqxvnp" path="res://resources/characters/chick/chick-a.svg" id="3_vkls3"] +[ext_resource type="Texture2D" uid="uid://b1aq0k7tf1p1" path="res://resources/characters/kernyr/kernyr.jpg" id="3_vkls3"] [sub_resource type="SpriteFrames" id="SpriteFrames_vkls3"] animations = [{ @@ -18,7 +18,7 @@ animations = [{ }] [sub_resource type="RectangleShape2D" id="RectangleShape2D_vkls3"] -size = Vector2(118, 98) +size = Vector2(190, 190) [node name="Kernyr" instance=ExtResource("1_bha5j")] script = ExtResource("2_vkls3") @@ -31,11 +31,13 @@ appleCount = Vector2i(2, 5) sprite_frames = SubResource("SpriteFrames_vkls3") [node name="staticBackground" parent="texture" index="0"] -scale = Vector2(1.622, 1.622) +position = Vector2(0, -46) +scale = Vector2(0.3, 0.3) texture = ExtResource("3_vkls3") [node name="hitbox" parent="texture/hurtbox" index="0"] +position = Vector2(0, -46) shape = SubResource("RectangleShape2D_vkls3") [node name="statebar" parent="." index="4"] -position = Vector2(0, -132) +position = Vector2(0, -213) diff --git a/components/Weapons/Tree.tscn b/components/Weapons/Tree.tscn index 56aa6a0..8f69a14 100644 --- a/components/Weapons/Tree.tscn +++ b/components/Weapons/Tree.tscn @@ -16,7 +16,7 @@ store = { "atk": 20, "count": 1.0, "max": 3.0, -"rate": 1.0 +"rate": 0.25 } storeType = { "atk": 1, @@ -35,6 +35,7 @@ descriptionTemplate = "进行[b]格挡[/b],化解飞来的子弹。 乾坤剑造成的伤害+$atk点。 格挡时机越精确,成功率越高。" cooldown = 250.0 +debugRebuild = true [node name="avatar" parent="container/info" index="0"] texture = ExtResource("3_nwamk") diff --git a/scripts/Contents/Wave.gd b/scripts/Contents/Wave.gd index 8322b97..b770534 100644 --- a/scripts/Contents/Wave.gd +++ b/scripts/Contents/Wave.gd @@ -22,7 +22,6 @@ func duplicate() -> Wave: wave.per = per return wave -static var current: int = startWith(1) if WorldManager.isRelease() else startWith(1) static var WAVE_NORMAL = [ Wave.create("Hen", 1, 3, false, 0, INF, 1), Wave.create("Cat", 1, 5, false, 0, INF, 1), @@ -50,7 +49,8 @@ static var WAVE_JUSTJOKE = [ Wave.create("Kernyr", 0, 0, true, 0, INF, 1), ] static var WAVE_EMPTY = [] -static var data = WAVE_JUSTJOKE if WorldManager.isRelease() else WAVE_JUSTJOKE +static var current: int = startWith(1) if WorldManager.isRelease() else startWith(10) +static var data = WAVE_NORMAL if WorldManager.isRelease() else WAVE_JUSTJOKE static func create( entity_: String, diff --git a/scripts/Tools/GameRule.gd b/scripts/Tools/GameRule.gd index 709cc75..2b8597d 100644 --- a/scripts/Tools/GameRule.gd +++ b/scripts/Tools/GameRule.gd @@ -7,7 +7,7 @@ static var allowFriendlyFire: bool = false # 是否允许友军伤害 static var bulletSpeedMultiplier: float = 1 # 子弹速度倍率 static var damageOffset: float = MathTool.percent(20) # 伤害随机浮动比例 static var beachballOffset: float = MathTool.percent(30) # 棒球掉落数随机浮动比例 -static var damageLabelSpawnOffset: float = 10 # 伤害标签生成位置的随机偏移 +static var damageLabelSpawnOffset: float = 30 # 伤害标签生成位置的随机偏移 static var itemDroppedSpawnOffset: float = 30 # 掉落物生成位置的随机偏移 static var appleDropRate: float = MathTool.percent(3) # 苹果掉落概率 static var refreshCountIncreaseCount: Vector2i = Vector2i(0, 3) # 刷新所需的棒球数量的增加的数量