1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00

feat(子弹系统): 添加扫帚系列子弹及相关资源

添加扫帚子弹、扫帚炮和扫帚回旋镖三种新子弹类型
包含子弹脚本、音效、动画和特效资源
修改EnergyBlock实体以支持新子弹的攻击逻辑
更新子弹基类添加销毁信号
This commit is contained in:
2026-05-01 09:12:27 +08:00
parent bd2525a55e
commit 8acb08fd14
27 changed files with 1093 additions and 16 deletions
+314
View File
@@ -0,0 +1,314 @@
[gd_scene format=3 uid="uid://dxvbkefc0pqqb"]
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_t7cj0"]
[ext_resource type="Script" uid="uid://b7bstudbunlxr" path="res://scripts/Contents/Bullets/Broom.gd" id="2_p0bgf"]
[ext_resource type="Texture2D" uid="uid://caf67vt47y180" path="res://resources/bullets/swords/broom.svg" id="2_wk57h"]
[ext_resource type="Script" uid="uid://ckc6guqib3rno" path="res://scripts/Statemachine/SyncTransform.gd" id="4_87bq4"]
[sub_resource type="Animation" id="Animation_tafq3"]
length = 0.001
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("broom/trail:emitting")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".:modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("%hitbox:disabled")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
[sub_resource type="Animation" id="Animation_m24xy"]
resource_name = "attack"
length = 0.5
step = 0.05
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(2, 0),
"points": PackedFloat32Array(1.57, 0, 0, 0, -3, -1.7, 0, 0, 0, 0),
"times": PackedFloat32Array(0, 0.5)
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("broom/trail:emitting")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.5),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".:modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0.4, 0.5),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
tracks/3/type = "method"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("%texture/..")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0.5),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [false],
"method": &"tryDestroy"
}]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("%hitbox:disabled")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_wk57h"]
resource_name = "destroy"
length = 0.5
step = 0.1
[sub_resource type="Animation" id="Animation_p0bgf"]
resource_name = "loop"
loop_mode = 1
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 6.28319]
}
[sub_resource type="Animation" id="Animation_87bq4"]
resource_name = "prepare"
length = 0.5
step = 0.1
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(2, 2),
"points": PackedFloat32Array(0, 0, 0, 0, 0, 1.57, -0.5, 0, 0, 0),
"times": PackedFloat32Array(0, 0.5)
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("broom/trail:emitting")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("%hitbox:disabled")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
[sub_resource type="Animation" id="Animation_1a70s"]
length = 3.0
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [37.69911184307752, 0.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("broom/trail:emitting")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("%hitbox:disabled")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/3/type = "method"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("%texture/..")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(3),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [false],
"method": &"tryDestroy"
}]
}
[sub_resource type="Animation" id="Animation_keubc"]
resource_name = "spawn"
[sub_resource type="AnimationLibrary" id="AnimationLibrary_tafq3"]
_data = {
&"RESET": SubResource("Animation_tafq3"),
&"attack": SubResource("Animation_m24xy"),
&"destroy": SubResource("Animation_wk57h"),
&"loop": SubResource("Animation_p0bgf"),
&"prepare": SubResource("Animation_87bq4"),
&"rotate": SubResource("Animation_1a70s"),
&"spawn": SubResource("Animation_keubc")
}
[sub_resource type="Curve" id="Curve_wk57h"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_p0bgf"]
curve = SubResource("Curve_wk57h")
[sub_resource type="Curve" id="Curve_p0bgf"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_87bq4"]
curve = SubResource("Curve_p0bgf")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_87bq4"]
particle_flag_disable_z = true
direction = Vector3(0, -1, 0)
spread = 0.0
initial_velocity_min = 300.0
initial_velocity_max = 300.0
gravity = Vector3(0, 0, 0)
scale_curve = SubResource("CurveTexture_87bq4")
alpha_curve = SubResource("CurveTexture_p0bgf")
[sub_resource type="RectangleShape2D" id="RectangleShape2D_keubc"]
size = Vector2(252, 39.99996)
[node name="Broom" unique_id=5571707 instance=ExtResource("1_t7cj0")]
script = ExtResource("2_p0bgf")
displayName = "扫帚"
baseDamage = 20.0
motionType = 0
penerate = 1.0
[node name="animator" parent="texture" parent_id_path=PackedInt32Array(162977358) index="0" unique_id=1114087117]
libraries/ = SubResource("AnimationLibrary_tafq3")
[node name="broom" type="Sprite2D" parent="texture" parent_id_path=PackedInt32Array(162977358) index="2" unique_id=386227142]
position = Vector2(200, 0)
rotation = 3.1415927
texture = ExtResource("2_wk57h")
[node name="trail" type="GPUParticles2D" parent="texture/broom" index="0" unique_id=1647766234]
z_index = -1
emitting = false
amount = 20
texture = ExtResource("2_wk57h")
preprocess = 2.0
local_coords = true
process_material = SubResource("ParticleProcessMaterial_87bq4")
[node name="hitbox" parent="." index="1" unique_id=175349408 node_paths=PackedStringArray("target")]
position = Vector2(200, 0)
rotation = -3.1415925
shape = SubResource("RectangleShape2D_keubc")
disabled = true
script = ExtResource("4_87bq4")
target = NodePath("../texture/broom")
enablePosition = true
enableRotation = true
enableScale = true
+169
View File
@@ -0,0 +1,169 @@
[gd_scene format=3 uid="uid://dbap6sorejeog"]
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_2ngbh"]
[ext_resource type="Script" uid="uid://k63hoju1eyd" path="res://scripts/Contents/Bullets/BroomBoomerang.gd" id="2_14u4g"]
[ext_resource type="Texture2D" uid="uid://caf67vt47y180" path="res://resources/bullets/swords/broom.svg" id="3_wnwnl"]
[ext_resource type="Texture2D" uid="uid://d2pndtow16635" path="res://resources/bullets/lgbt-bullet/造型2.svg" id="4_wnwnl"]
[sub_resource type="SpriteFrames" id="SpriteFrames_0vfy6"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("3_wnwnl")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[sub_resource type="Animation" id="Animation_evbtt"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_14u4g"]
resource_name = "destroy"
length = 0.5
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(1, 1), Vector2(0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.5),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
[sub_resource type="Animation" id="Animation_wnwnl"]
resource_name = "loop"
length = 0.5
loop_mode = 1
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [6.283185307179586, 0.0]
}
[sub_resource type="Animation" id="Animation_0vfy6"]
resource_name = "spawn"
[sub_resource type="AnimationLibrary" id="AnimationLibrary_evbtt"]
_data = {
&"RESET": SubResource("Animation_evbtt"),
&"destroy": SubResource("Animation_14u4g"),
&"loop": SubResource("Animation_wnwnl"),
&"spawn": SubResource("Animation_0vfy6")
}
[sub_resource type="Curve" id="Curve_14u4g"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_wnwnl"]
curve = SubResource("Curve_14u4g")
[sub_resource type="Curve" id="Curve_0vfy6"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_evbtt"]
curve = SubResource("Curve_0vfy6")
[sub_resource type="Gradient" id="Gradient_0vfy6"]
colors = PackedColorArray(0.9490196, 0.7529412, 0.3882353, 1, 0.42, 0.30975002, 0.1554, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_evbtt"]
gradient = SubResource("Gradient_0vfy6")
[sub_resource type="Curve" id="Curve_eep1e"]
_data = [Vector2(0, 0.7), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_g0gbx"]
curve = SubResource("Curve_eep1e")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_m5hsn"]
particle_flag_disable_z = true
emission_shape = 1
emission_sphere_radius = 95.03
angle_min = 1.0728835e-05
angle_max = 360.00003
angle_curve = SubResource("CurveTexture_evbtt")
gravity = Vector3(0, 0, 0)
scale_curve = SubResource("CurveTexture_g0gbx")
color_initial_ramp = SubResource("GradientTexture1D_evbtt")
alpha_curve = SubResource("CurveTexture_wnwnl")
[sub_resource type="CircleShape2D" id="CircleShape2D_wnwnl"]
radius = 124.01613
[node name="BroomBoomerang" unique_id=5571707 instance=ExtResource("1_2ngbh")]
script = ExtResource("2_14u4g")
displayName = "扫帚回旋镖"
speed = 40.0
baseDamage = 15.0
penerate = 1.0
lifeTime = 10000.0
autoLoopAnimation = true
autoDestroyAnimation = true
[node name="texture" parent="." index="0" unique_id=162977358]
rotation = 6.2831855
sprite_frames = SubResource("SpriteFrames_0vfy6")
[node name="animator" parent="texture" index="0" unique_id=1114087117]
libraries/ = SubResource("AnimationLibrary_evbtt")
[node name="trail" type="GPUParticles2D" parent="texture" index="2" unique_id=1139927837]
amount = 200
texture = ExtResource("4_wnwnl")
process_material = SubResource("ParticleProcessMaterial_m5hsn")
[node name="hitbox" parent="." index="1" unique_id=175349408]
shape = SubResource("CircleShape2D_wnwnl")
+230
View File
@@ -0,0 +1,230 @@
[gd_scene format=3 uid="uid://byca4v4gs06q4"]
[ext_resource type="PackedScene" uid="uid://crtdkysmnkith" path="res://components/Abstracts/BulletBase.tscn" id="1_7ykg5"]
[ext_resource type="Script" uid="uid://cuu5b0gibd054" path="res://scripts/Contents/Bullets/BroomGun.gd" id="2_jn776"]
[ext_resource type="AudioStream" uid="uid://b4542lbj0y35e" path="res://resources/sounds/effect/gb fire.wav" id="2_uv0o1"]
[ext_resource type="AudioStream" uid="uid://bt0bipy0c67lt" path="res://resources/sounds/effect/gb ready.wav" id="2_vxjbd"]
[ext_resource type="PackedScene" uid="uid://bx7u5hcokirm2" path="res://components/Effects/GBShoot.tscn" id="2_x66fw"]
[ext_resource type="Texture2D" uid="uid://caf67vt47y180" path="res://resources/bullets/swords/broom.svg" id="5_mscdc"]
[sub_resource type="Animation" id="Animation_x66fw"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 0)]
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".:position:x")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("light:emitting")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("%hitbox:disabled")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
[sub_resource type="Animation" id="Animation_uv0o1"]
resource_name = "destroy"
length = 0.5
step = 0.1
[sub_resource type="Animation" id="Animation_vxjbd"]
resource_name = "loop"
length = 0.5
loop_mode = 1
step = 0.05
[sub_resource type="Animation" id="Animation_mscdc"]
resource_name = "spawn"
length = 3.0
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".:position:x")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(2, 0),
"points": PackedFloat32Array(0, 0, 0, 0, 0, -200, -0.5, 0, 0, 0),
"times": PackedFloat32Array(0, 1)
}
tracks/2/type = "method"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("GBShoot")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0.4),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"shot"
}]
}
tracks/3/type = "audio"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("audio")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"clips": [{
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource("2_vxjbd")
}, {
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource("2_uv0o1")
}],
"times": PackedFloat32Array(0, 1)
}
tracks/3/use_blend = true
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("light:emitting")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0, 1, 3),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [false, true, false]
}
tracks/5/type = "method"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("%texture/..")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(1, 3),
"transitions": PackedFloat32Array(1, 1),
"values": [{
"args": [],
"method": &"shake"
}, {
"args": [false],
"method": &"tryDestroy"
}]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("%hitbox:disabled")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0, 1, 3),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [true, false, true]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_jn776"]
_data = {
&"RESET": SubResource("Animation_x66fw"),
&"destroy": SubResource("Animation_uv0o1"),
&"loop": SubResource("Animation_vxjbd"),
&"spawn": SubResource("Animation_mscdc")
}
[sub_resource type="Curve" id="Curve_mscdc"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.5), 0.0, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_jn776"]
curve = SubResource("Curve_mscdc")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_v73cl"]
particle_flag_disable_z = true
spread = 0.0
initial_velocity_min = 2000.0
initial_velocity_max = 2000.0
gravity = Vector3(0, 0, 0)
alpha_curve = SubResource("CurveTexture_jn776")
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mscdc"]
size = Vector2(1968, 44)
[node name="BroomGun" unique_id=5571707 instance=ExtResource("1_7ykg5")]
script = ExtResource("2_jn776")
displayName = "扫帚炮"
baseDamage = 20.0
motionType = 2
penerate = 1.0
autoSpawnAnimation = true
freeAfterSpawn = true
[node name="texture" parent="." index="0" unique_id=162977358]
modulate = Color(1, 1, 1, 0)
[node name="animator" parent="texture" index="0" unique_id=1114087117]
libraries/ = SubResource("AnimationLibrary_jn776")
[node name="GBShoot" parent="texture" index="2" unique_id=2131774557 instance=ExtResource("2_x66fw")]
scale = Vector2(0.4, 0.4)
[node name="light" type="GPUParticles2D" parent="texture" index="3" unique_id=1278683297]
position = Vector2(53, 0)
emitting = false
amount = 30
texture = ExtResource("5_mscdc")
preprocess = 1.0
visibility_rect = Rect2(-50, -50, 2000, 100)
local_coords = true
process_material = SubResource("ParticleProcessMaterial_v73cl")
[node name="hitbox" parent="." index="1" unique_id=175349408]
position = Vector2(815, -2)
shape = SubResource("RectangleShape2D_mscdc")
disabled = true
+64
View File
@@ -0,0 +1,64 @@
[gd_scene format=3 uid="uid://bx7u5hcokirm2"]
[ext_resource type="PackedScene" uid="uid://bcvuuy2m0pke0" path="res://components/Abstracts/EffectBase.tscn" id="1_iehxv"]
[ext_resource type="Texture2D" uid="uid://dkffsct3smqk1" path="res://resources/effects/gb-shoot/spr_gasterblaster_0.png.png" id="2_j1rlx"]
[ext_resource type="Texture2D" uid="uid://dt6kekbd62f3" path="res://resources/effects/gb-shoot/spr_gasterblaster_1.png.png" id="3_1jovr"]
[ext_resource type="Texture2D" uid="uid://bwni2gerockyl" path="res://resources/effects/gb-shoot/spr_gasterblaster_2.png.png" id="4_s0ea4"]
[ext_resource type="Texture2D" uid="uid://b3x7cqswdxtmb" path="res://resources/effects/gb-shoot/spr_gasterblaster_4.png.png" id="5_if15y"]
[ext_resource type="Texture2D" uid="uid://jc8yengnyin2" path="res://resources/effects/gb-shoot/spr_gasterblaster_5.png.png" id="6_1bnxw"]
[sub_resource type="SpriteFrames" id="SpriteFrames_ajm1x"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_j1rlx")
}, {
"duration": 1.0,
"texture": ExtResource("3_1jovr")
}, {
"duration": 1.0,
"texture": ExtResource("4_s0ea4")
}, {
"duration": 1.0,
"texture": ExtResource("5_if15y")
}, {
"duration": 1.0,
"texture": ExtResource("6_1bnxw")
}, {
"duration": 1.0,
"texture": ExtResource("6_1bnxw")
}, {
"duration": 1.0,
"texture": ExtResource("6_1bnxw")
}, {
"duration": 1.0,
"texture": ExtResource("6_1bnxw")
}, {
"duration": 1.0,
"texture": ExtResource("6_1bnxw")
}, {
"duration": 1.0,
"texture": ExtResource("6_1bnxw")
}, {
"duration": 1.0,
"texture": ExtResource("6_1bnxw")
}, {
"duration": 1.0,
"texture": ExtResource("6_1bnxw")
}, {
"duration": 1.0,
"texture": ExtResource("6_1bnxw")
}, {
"duration": 1.0,
"texture": ExtResource("6_1bnxw")
}],
"loop": false,
"name": &"spawn",
"speed": 5.0
}]
[node name="GBShoot" unique_id=2131774557 instance=ExtResource("1_iehxv")]
spawnTexture = "spawn"
[node name="texture" parent="stage" index="1"]
sprite_frames = SubResource("SpriteFrames_ajm1x")
+1 -4
View File
@@ -11,9 +11,6 @@ script = ExtResource("2_0xgcv")
avatarTexture = ExtResource("2_wgtcw")
displayName = "紫水晶簇"
costBeachball = 200
store = {
"atk": 0
}
descriptionTemplate = "发射[b]紫水晶[/b],撞击时造成$atk点伤害。"
cooldown = 200.0
@@ -30,7 +27,7 @@ count = 200
displayName = "紫水晶簇"
[node name="description" parent="container" parent_id_path=PackedInt32Array(575698869) index="2" unique_id=566230682]
text = "[center]发射[b]紫水晶[/b],撞击时造成[color=cyan]10[/color]点伤害。[/center]"
text = "[center]发射[b]紫水晶[/b],撞击时造成[color=cyan]0[/color]点伤害。[/center]"
[node name="tease" parent="container" parent_id_path=PackedInt32Array(575698869) index="3" unique_id=689277044]
visible = false
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dkffsct3smqk1"
path="res://.godot/imported/spr_gasterblaster_0.png.png-97ef06139d002d3c2ce40d2d0097e75e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resources/effects/gb-shoot/spr_gasterblaster_0.png.png"
dest_files=["res://.godot/imported/spr_gasterblaster_0.png.png-97ef06139d002d3c2ce40d2d0097e75e.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dt6kekbd62f3"
path="res://.godot/imported/spr_gasterblaster_1.png.png-ec4d41823c4102f04d04c24794d887c5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resources/effects/gb-shoot/spr_gasterblaster_1.png.png"
dest_files=["res://.godot/imported/spr_gasterblaster_1.png.png-ec4d41823c4102f04d04c24794d887c5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bwni2gerockyl"
path="res://.godot/imported/spr_gasterblaster_2.png.png-fba8690fea42f3612767b870ce0cbc1f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resources/effects/gb-shoot/spr_gasterblaster_2.png.png"
dest_files=["res://.godot/imported/spr_gasterblaster_2.png.png-fba8690fea42f3612767b870ce0cbc1f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b3x7cqswdxtmb"
path="res://.godot/imported/spr_gasterblaster_4.png.png-b8ef14b9ded7dcd11903ed3daea0a305.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resources/effects/gb-shoot/spr_gasterblaster_4.png.png"
dest_files=["res://.godot/imported/spr_gasterblaster_4.png.png-b8ef14b9ded7dcd11903ed3daea0a305.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://jc8yengnyin2"
path="res://.godot/imported/spr_gasterblaster_5.png.png-958789c32d2c82fb1928be479bbc4b71.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resources/effects/gb-shoot/spr_gasterblaster_5.png.png"
dest_files=["res://.godot/imported/spr_gasterblaster_5.png.png-958789c32d2c82fb1928be479bbc4b71.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.
@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://b4542lbj0y35e"
path="res://.godot/imported/gb fire.wav-62bc39764204aa7e721905e7fae12fef.sample"
[deps]
source_file="res://resources/sounds/effect/gb fire.wav"
dest_files=["res://.godot/imported/gb fire.wav-62bc39764204aa7e721905e7fae12fef.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2
Binary file not shown.
@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://bt0bipy0c67lt"
path="res://.godot/imported/gb ready.wav-79197a5440f54962dd6d29d50fe29212.sample"
[deps]
source_file="res://resources/sounds/effect/gb ready.wav"
dest_files=["res://.godot/imported/gb ready.wav-79197a5440f54962dd6d29d50fe29212.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2
+5
View File
@@ -0,0 +1,5 @@
extends BulletBase
class_name BroomBullet
func ai():
PresetBulletAI.lockLauncher(self , launcher, true)
+1
View File
@@ -0,0 +1 @@
uid://b7bstudbunlxr
@@ -0,0 +1,8 @@
extends BulletBase
class_name BroomBoomerangBullet
func ai():
PresetBulletAI.forward(self , rotation)
speed -= 0.5
if speed < 0 && position.distance_to(launcher.position) < 100:
tryDestroy()
@@ -0,0 +1 @@
uid://k63hoju1eyd
+7
View File
@@ -0,0 +1,7 @@
extends BulletBase
class_name BroomGun
func shake():
CameraManager.shake(2000, 200)
func ai():
PresetBulletAI.trace(self , launcher.currentFocusedPosition, 0.05)
+1
View File
@@ -0,0 +1 @@
uid://cuu5b0gibd054
+41 -12
View File
@@ -1,28 +1,57 @@
extends EntityBase
class_name EnergyBlockEntity
var currentBroom: BroomBullet
func register():
fields[FieldStore.Entity.MAX_HEALTH] = 5000
hit.connect(
func(damage: float, bullet: BulletBase, _crit: bool):
bullet.launcher.storeEnergy(damage)
)
fields[FieldStore.Entity.MAX_HEALTH] = 3000
attackCooldownMap[0] = 6000
attackCooldownMap[1] = 10000
attackCooldownMap[2] = 4000
attackCooldownMap[1] = 3000
attackCooldownMap[2] = 8000
attackCooldownMap[3] = 8000
attackCooldownMap[4] = 3000
attackCooldownMap[4] = 2000
attackCooldownMap[5] = 2000
attackCooldownMap[6] = 5000
attackMutexes = [1, 4]
attackMutexes = [0, 1]
sprintMultiplier = 30
func ai():
for i in 7:
tryAttack(i, [1, 3])
PresetEntityAI.distanceAttack(self , currentFocusedBoss, 0, 300, 0)
for i in 6:
tryAttack(i + 1, [3])
if 1 not in attackingStates:
PresetEntityAI.follow(self , currentFocusedBoss)
func attack(type: int):
if type == 0:
BulletBase.generate(ComponentManager.getBullet("SwingSword"), self , getTrackingAnchor(), getTrackingAnchor().angle_to_point(currentFocusedPosition))
for bullet in BulletBase.generate(ComponentManager.getBullet("SwingSword"), self , getTrackingAnchor(), getTrackingAnchor().angle_to_point(currentFocusedPosition)):
if bullet is SwingSwordBullet:
await bullet.destroied
elif type == 1:
for bullet in BulletBase.generate(ComponentManager.getBullet("Broom"), self , getTrackingAnchor(), getTrackingAnchor().angle_to_point(currentFocusedPosition)):
if is_instance_valid(currentBroom): break
if bullet is BroomBullet:
currentBroom = bullet
await TickTool.frame()
bullet.animator.play("prepare")
await bullet.animator.animation_finished
await chargeUp()
trySprint()
currentBroom.animator.play("attack")
elif type == 2:
for i in 3:
for bullet in BulletBase.generate(ComponentManager.getBullet("BroomGun"), self , position, position.angle_to_point(currentFocusedPosition)):
if bullet is BulletBase:
bullet.position += Vector2.from_angle(bullet.rotation).rotated(deg_to_rad(90)) * i * 100
elif type == 3:
for bullet in BulletBase.generate(ComponentManager.getBullet("Broom"), self , getTrackingAnchor(), 0):
if bullet is BroomBullet:
await TickTool.frame()
bullet.animator.play("rotate")
elif type == 4:
BulletBase.generate(ComponentManager.getBullet("BroomBoomerang"), self , position, position.angle_to_point(currentFocusedPosition))
elif type == 5:
var track = getTrackingAnchor()
var bullet = BulletTool.findClosetBulletCanDamage(track, get_tree(), self , 200)
if is_instance_valid(bullet):
BulletBase.generate(ComponentManager.getBullet("Parrier"), self , track, track.angle_to_point(bullet.position))
func sprint():
move((currentFocusedPosition - position).normalized() * sprintMultiplier, true)
+3
View File
@@ -10,6 +10,8 @@ enum MotionType {
BREATH, # 吐息
}
signal destroied(becauseMap: bool)
@export var displayName: String = "未知子弹"
@export var speed: float = 10.0
@export var baseDamage: float = 10.0
@@ -188,6 +190,7 @@ func tryDestroy(becauseMap: bool = false):
if autoDestroyAnimation:
animator.play("destroy")
await animator.animation_finished
destroied.emit(becauseMap)
queue_free()
func trySplit():
if is_instance_valid(launcher) and canDuplicateSelf: