spacegame/bullet/bullet.tscn
2025-05-03 14:12:25 +02:00

155 lines
4.5 KiB
Text

[gd_scene load_steps=12 format=3 uid="uid://dnndsvtgqr8eq"]
[ext_resource type="Script" uid="uid://c3eechg8hdpsc" path="res://bullet/bullet.gd" id="1_0qjqd"]
[ext_resource type="Texture2D" uid="uid://cnj23l3endv58" path="res://bullet/bullet.png" id="1_k2aps"]
[ext_resource type="Texture2D" uid="uid://coegvp4cunsnn" path="res://bullet/bullet_colors.png" id="2_6wip1"]
[sub_resource type="CircleShape2D" id="CircleShape2D_k2aps"]
radius = 4.0
[sub_resource type="Animation" id="Animation_6wip1"]
length = 0.001
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("image:scale:x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("image:scale:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(1, -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("trail:emitting")
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_k2aps"]
resource_name = "death"
length = 10.0
step = 0.1
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("image:scale:x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 0, 0),
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0, 1e-05, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0, 9.6, 10)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("image:scale:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0, 0, 0),
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0, 1e-05, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0, 9.6, 10)
}
tracks/2/type = "method"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(10),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("trail:emitting")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 9),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_6wip1"]
_data = {
&"RESET": SubResource("Animation_6wip1"),
&"death": SubResource("Animation_k2aps")
}
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_k2aps"]
particles_animation = true
particles_anim_h_frames = 4
particles_anim_v_frames = 1
particles_anim_loop = false
[sub_resource type="Curve" id="Curve_k2aps"]
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.238372, 1), 0.0, 0.0, 0, 0, Vector2(0.738372, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 4
[sub_resource type="CurveTexture" id="CurveTexture_6wip1"]
curve = SubResource("Curve_k2aps")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_k2aps"]
particle_flag_disable_z = true
emission_shape_scale = Vector3(5, 5, 0)
emission_shape = 1
emission_sphere_radius = 1.0
angle_min = -720.0
angle_max = 720.0
gravity = Vector3(0, 0, 0)
scale_curve = SubResource("CurveTexture_6wip1")
anim_offset_max = 1.0
[node name="bullet" type="RigidBody2D"]
contact_monitor = true
max_contacts_reported = 1
script = ExtResource("1_0qjqd")
[node name="collision" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_k2aps")
[node name="image" type="Sprite2D" parent="."]
modulate = Color(1.1, 1.1, 1.1, 1)
texture = ExtResource("1_k2aps")
[node name="animation" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_6wip1")
}
autoplay = "death"
[node name="trail" type="GPUParticles2D" parent="."]
modulate = Color(1.5, 1.5, 1.5, 1)
material = SubResource("CanvasItemMaterial_k2aps")
amount = 20
texture = ExtResource("2_6wip1")
process_material = SubResource("ParticleProcessMaterial_k2aps")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]