diff --git a/components/Bullets/Broom.tscn b/components/Bullets/Broom.tscn index 15e181c..79f63d7 100644 --- a/components/Bullets/Broom.tscn +++ b/components/Bullets/Broom.tscn @@ -276,7 +276,7 @@ scale_curve = SubResource("CurveTexture_87bq4") alpha_curve = SubResource("CurveTexture_p0bgf") [sub_resource type="RectangleShape2D" id="RectangleShape2D_keubc"] -size = Vector2(252, 39.99996) +size = Vector2(150, 40) [node name="Broom" unique_id=5571707 instance=ExtResource("1_t7cj0")] script = ExtResource("2_p0bgf") @@ -302,13 +302,16 @@ preprocess = 2.0 local_coords = true process_material = SubResource("ParticleProcessMaterial_87bq4") +[node name="anchor" type="Node2D" parent="texture/broom" index="1" unique_id=614094225] +position = Vector2(-53.598587, 1.325489) + [node name="hitbox" parent="." index="1" unique_id=175349408 node_paths=PackedStringArray("target")] -position = Vector2(200, 1.907981e-05) -rotation = -3.1415925 +position = Vector2(225, -117) +rotation = 2.6673002 shape = SubResource("RectangleShape2D_keubc") disabled = true script = ExtResource("4_87bq4") -target = NodePath("../texture/broom") +target = NodePath("../texture/broom/anchor") enablePosition = true enableRotation = true enableScale = true diff --git a/components/Bullets/BroomGun.tscn b/components/Bullets/BroomGun.tscn index c8efdc3..6ea8891 100644 --- a/components/Bullets/BroomGun.tscn +++ b/components/Bullets/BroomGun.tscn @@ -56,6 +56,18 @@ tracks/3/keys = { "update": 1, "values": [true] } +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("%texture/..:canTrace") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} [sub_resource type="Animation" id="Animation_uv0o1"] resource_name = "destroy" @@ -169,6 +181,18 @@ tracks/6/keys = { "update": 1, "values": [true, false, true] } +tracks/7/type = "value" +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/path = NodePath("%texture/..:canTrace") +tracks/7/interp = 1 +tracks/7/loop_wrap = true +tracks/7/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [true, false] +} [sub_resource type="AnimationLibrary" id="AnimationLibrary_jn776"] _data = { @@ -198,6 +222,7 @@ size = Vector2(1968, 44) [node name="BroomGun" unique_id=5571707 instance=ExtResource("1_7ykg5")] script = ExtResource("2_jn776") +canTrace = true displayName = "扫帚炮" baseDamage = 5.0 motionType = 2 diff --git a/scripts/Contents/Bullets/BroomGun.gd b/scripts/Contents/Bullets/BroomGun.gd index 33a5fd4..a63637f 100644 --- a/scripts/Contents/Bullets/BroomGun.gd +++ b/scripts/Contents/Bullets/BroomGun.gd @@ -1,7 +1,10 @@ extends BulletBase class_name BroomGun +@export var canTrace: bool = true + func shake(): CameraManager.shake(2000, 200) func ai(): - PresetBulletAI.trace(self , launcher.currentFocusedPosition, 0.05) + if canTrace: + PresetBulletAI.trace(self , launcher.currentFocusedPosition, 0.05) diff --git a/scripts/Contents/Characters/EnergyBlock.gd b/scripts/Contents/Characters/EnergyBlock.gd index 0b8aa3e..26a0bdf 100644 --- a/scripts/Contents/Characters/EnergyBlock.gd +++ b/scripts/Contents/Characters/EnergyBlock.gd @@ -45,11 +45,11 @@ func attack(type: int): elif type == 3: for bullet in BulletBase.generate(ComponentManager.getBullet("Broom"), self , getTrackingAnchor(), 0): if bullet is BroomBullet: - fields[FieldStore.Entity.MOVEMENT_SPEED] *= 2 + fields[FieldStore.Entity.MOVEMENT_SPEED] *= 3 await TickTool.frame() bullet.animator.play("rotate") await bullet.destroied - fields[FieldStore.Entity.MOVEMENT_SPEED] /= 2 + fields[FieldStore.Entity.MOVEMENT_SPEED] /= 3 elif type == 4: BulletBase.generate(ComponentManager.getBullet("BroomBoomerang"), self , position, position.angle_to_point(currentFocusedPosition)) elif type == 5: