diff --git a/components/Bullets/SwingSword.tscn b/components/Bullets/SwingSword.tscn index 982ad32..6100436 100644 --- a/components/Bullets/SwingSword.tscn +++ b/components/Bullets/SwingSword.tscn @@ -1,6 +1,7 @@ [gd_scene format=3 uid="uid://b7yp28gfrqj5w"] [ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_f7kh1"] +[ext_resource type="Script" uid="uid://baqbg743uf156" path="res://scripts/Contents/Bullets/SwingSword.gd" id="2_23nu4"] [ext_resource type="AudioStream" uid="uid://cer3lxbxqw5pq" path="res://resources/sounds/effect/sword1.mp3" id="2_ccsa1"] [ext_resource type="Texture2D" uid="uid://caf67vt47y180" path="res://resources/bullets/swords/broom.svg" id="2_nqryj"] [ext_resource type="AudioStream" uid="uid://bm2o8hu7nyqh1" path="res://resources/sounds/effect/sword3.mp3" id="3_23nu4"] @@ -238,11 +239,7 @@ alpha_curve = SubResource("CurveTexture_2tlcd") size = Vector2(259.81308, 36.189156) [node name="SwingSword" unique_id=5571707 instance=ExtResource("1_f7kh1")] -displayName = "扫帚" -motionType = 0 -penerate = 1.0 -autoSpawnAnimation = true -freeAfterSpawn = true +script = ExtResource("2_23nu4") [node name="texture" parent="." index="0" unique_id=162977358] scale = Vector2(2, 2) diff --git a/scripts/Contents/Bullets/SwingSword.gd b/scripts/Contents/Bullets/SwingSword.gd new file mode 100644 index 0000000..0c8bd0a --- /dev/null +++ b/scripts/Contents/Bullets/SwingSword.gd @@ -0,0 +1,5 @@ +extends BulletBase +class_name SwingSwordBullet + +func ai(): + PresetBulletAI.lockLauncher(self , launcher, true) diff --git a/scripts/Contents/Bullets/SwingSword.gd.uid b/scripts/Contents/Bullets/SwingSword.gd.uid new file mode 100644 index 0000000..57b678e --- /dev/null +++ b/scripts/Contents/Bullets/SwingSword.gd.uid @@ -0,0 +1 @@ +uid://baqbg743uf156