Comets.gd/scenes/bullet.tscn

28 lines
944 B
Plaintext

[gd_scene load_steps=4 format=3 uid="uid://btqqwoybwtc0a"]
[ext_resource type="Texture2D" uid="uid://dkig6mppjmlx0" path="res://assets/img/bullet.png" id="1_6rsjj"]
[ext_resource type="Script" path="res://scripts/bullet.gd" id="1_jyq7a"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5nukh"]
size = Vector2(4, 16)
[node name="Bullet" type="Area2D" groups=["bullet"]]
position = Vector2(0, -8)
collision_mask = 2
script = ExtResource("1_jyq7a")
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(1, 0)
texture = ExtResource("1_6rsjj")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_5nukh")
[node name="LifeTimer" type="Timer" parent="."]
wait_time = 0.5
one_shot = true
autostart = true
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="timeout" from="LifeTimer" to="." method="_on_life_timer_timeout"]