bullet.tscn 597 B

123456789101112131415161718192021
  1. [gd_scene load_steps=3 format=2]
  2. [ext_resource path="res://bullet.gd" type="Script" id=1]
  3. [sub_resource type="RectangleShape2D" id=1]
  4. extents = Vector2( 3, 3 )
  5. [node name="bullet" type="Area2D"]
  6. collision_layer = 13
  7. collision_mask = 13
  8. script = ExtResource( 1 )
  9. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  10. shape = SubResource( 1 )
  11. [node name="Timer" type="Timer" parent="."]
  12. wait_time = 3.0
  13. autostart = true
  14. [connection signal="body_entered" from="." to="." method="_on_bullet_body_entered"]
  15. [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]