Files
godot-demo-projects/2d/platformer/player/bullet.tscn
2023-02-23 21:10:01 -05:00

100 lines
2.5 KiB
Plaintext

[gd_scene load_steps=9 format=3 uid="uid://bdeyraansvyga"]
[ext_resource type="Script" path="res://player/bullet.gd" id="1_cokcn"]
[ext_resource type="Texture2D" uid="uid://c2aisfmq85suf" path="res://player/bullet.webp" id="2_4bup8"]
[sub_resource type="CanvasItemMaterial" id="1"]
[sub_resource type="CanvasItemMaterial" id="2"]
blend_mode = 1
[sub_resource type="CanvasItemMaterial" id="3"]
[sub_resource type="CircleShape2D" id="4"]
radius = 4.5
[sub_resource type="Animation" id="5"]
resource_name = "destroy"
length = 0.3
tracks/0/type = "method"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.3),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:self_modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("GPUParticles2D:self_modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_li3y6"]
_data = {
"destroy": SubResource("5")
}
[node name="Bullet" type="RigidBody2D"]
material = SubResource("1")
collision_layer = 0
collision_mask = 26
continuous_cd = 2
max_contacts_reported = 4
contact_monitor = true
script = ExtResource("1_cokcn")
[node name="GPUParticles2D" type="CPUParticles2D" parent="."]
material = SubResource("2")
emitting = false
lifetime = 0.3
speed_scale = 3.0
texture = ExtResource("2_4bup8")
spread = 0.0
gravity = Vector2(0, 0)
color = Color(1, 1, 1, 0.705882)
[node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("3")
texture = ExtResource("2_4bup8")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("4")
[node name="Timer" type="Timer" parent="."]
one_shot = true
autostart = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_li3y6")
}
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="timeout" from="Timer" to="." method="destroy"]