godot-shooter / asteroids / files / weapons / Bullet.tscn
Branch asteroids · default branch · all branches
Bullet.tscn
| 1 | [gd_scene load_steps=4 format=2] |
| 2 | |
| 3 | [ext_resource path="res://weapons/Bullet.gd" type="Script" id=1] |
| 4 | [ext_resource path="res://assets/kenney_simple-space/PNG/Default/effect_yellow.png" type="Texture" id=2] |
| 5 | |
| 6 | [sub_resource type="RectangleShape2D" id=1] |
| 7 | extents = Vector2( 4.50004, 16 ) |
| 8 | |
| 9 | [node name="Bullet" type="Area2D"] |
| 10 | modulate = Color( 1, 0, 0, 1 ) |
| 11 | position = Vector2( 0, -1 ) |
| 12 | collision_layer = 8 |
| 13 | collision_mask = 3 |
| 14 | script = ExtResource( 1 ) |
| 15 | |
| 16 | [node name="Sprite" type="Sprite" parent="."] |
| 17 | modulate = Color( 1, 0, 0, 1 ) |
| 18 | rotation = -0.00485545 |
| 19 | scale = Vector2( 0.104587, 0.478173 ) |
| 20 | texture = ExtResource( 2 ) |
| 21 | |
| 22 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] |
| 23 | visible = false |
| 24 | position = Vector2( 0, -0.5 ) |
| 25 | shape = SubResource( 1 ) |
| 26 | |
| 27 | [node name="Timer" type="Timer" parent="."] |
| 28 | one_shot = true |
| 29 | autostart = true |
| 30 | |
| 31 | [connection signal="body_entered" from="." to="." method="on_bullet_body_entered"] |
| 32 | [connection signal="timeout" from="Timer" to="." method="on_expiration"] |