From 5e82841d5835bca7e3cfc65cb6411835bfc3e6ff 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 09:53:38 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=AD=A6=E5=99=A8=E7=B3=BB=E7=BB=9F):?= =?UTF-8?q?=20=E6=9B=BF=E6=8D=A2=E8=93=9D=E8=89=B2=E6=B0=B4=E6=99=B6?= =?UTF-8?q?=E4=B8=BA=E7=B4=AB=E8=89=B2=E6=B0=B4=E6=99=B6=E5=B9=B6=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E5=A4=9A=E4=BD=99=E6=AD=A6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将Rooster角色的武器从蓝色水晶更换为紫色水晶,并移除了不再使用的树和道像武器 修复FieldShow状态机中costItems循环的长度检查问题 --- components/Characters/Rooster.tscn | 11 ++--------- scripts/Statemachine/FieldShow.gd | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/components/Characters/Rooster.tscn b/components/Characters/Rooster.tscn index 64c5a86..5650ac7 100644 --- a/components/Characters/Rooster.tscn +++ b/components/Characters/Rooster.tscn @@ -2,11 +2,9 @@ [ext_resource type="PackedScene" uid="uid://cvogxi7mktumf" path="res://components/Abstracts/EntityBase.tscn" id="1_e5pl8"] [ext_resource type="Script" uid="uid://cthtupc6dtbav" path="res://scripts/Contents/Characters/Rooster.gd" id="2_oqdqd"] -[ext_resource type="PackedScene" uid="uid://c3crr8r7y3oho" path="res://components/Weapons/BlueCrystal.tscn" id="3_joj4g"] +[ext_resource type="PackedScene" uid="uid://c0n3igy4hucrg" path="res://components/Weapons/PurpleCrystal.tscn" id="3_s7kxe"] [ext_resource type="AudioStream" uid="uid://cdrevrq7n6yqa" path="res://resources/sounds/effect/Boing.mp3" id="4_66s6c"] -[ext_resource type="PackedScene" uid="uid://cx7nogfnv7s8t" path="res://components/Weapons/Tree.tscn" id="4_jluqw"] [ext_resource type="AudioStream" uid="uid://benyec5bqni0b" path="res://resources/sounds/effect/Chomp.wav" id="4_k0yme"] -[ext_resource type="PackedScene" uid="uid://bbrllsqjmx0ie" path="res://components/Weapons/DaoStatue.tscn" id="5_fkh3f"] [ext_resource type="AudioStream" uid="uid://dmxh3bpk8vyy5" path="res://resources/sounds/effect/Coin.mp3" id="5_xnbhq"] [ext_resource type="AudioStream" uid="uid://4wuuf1osk0yv" path="res://resources/sounds/effect/Low Boing.wav" id="6_m5px1"] [ext_resource type="Texture2D" uid="uid://dwwpkn4q07ja2" path="res://icon.svg" id="10_0omr3"] @@ -99,12 +97,7 @@ process_material = SubResource("ParticleProcessMaterial_joj4g") [node name="weaponStore" parent="." index="2"] process_mode = 4 -[node name="BlueCrystal" parent="weaponStore" index="0" unique_id=2047904399 instance=ExtResource("3_joj4g")] - -[node name="Tree" parent="weaponStore" index="1" unique_id=185228402 instance=ExtResource("4_jluqw")] - -[node name="DaoStatue" parent="weaponStore" index="2" unique_id=265403254 instance=ExtResource("5_fkh3f")] -debugRebuild = false +[node name="PurpleCrystal" parent="weaponStore" index="0" unique_id=1991730660 instance=ExtResource("3_s7kxe")] [node name="sprint" parent="sounds" index="0"] stream = ExtResource("4_66s6c") diff --git a/scripts/Statemachine/FieldShow.gd b/scripts/Statemachine/FieldShow.gd index 650ca93..3813076 100644 --- a/scripts/Statemachine/FieldShow.gd +++ b/scripts/Statemachine/FieldShow.gd @@ -29,7 +29,7 @@ func _ready(): func(): if upgradable: if enoughToUpgrade(): - for index in costItems: + for index in len(costItems): var item = costItems[index] OutGameStorage.inventory[item] -= costCounts[index] value += upgradeValue