bullet.tscn 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. [gd_scene load_steps=6 format=2]
  2. [ext_resource path="res://player/bullet.gd" type="Script" id=1]
  3. [ext_resource path="res://player/bullet.png" type="Texture2D" id=2]
  4. [sub_resource type="CanvasItemMaterial" id=1]
  5. blend_mode = 1
  6. [sub_resource type="CircleShape2D" id=2]
  7. radius = 4.5
  8. [sub_resource type="Animation" id=3]
  9. length = 1.5
  10. tracks/0/type = "method"
  11. tracks/0/path = NodePath(".")
  12. tracks/0/interp = 1
  13. tracks/0/loop_wrap = true
  14. tracks/0/imported = false
  15. tracks/0/enabled = true
  16. tracks/0/keys = {
  17. "times": PackedFloat32Array(1.31),
  18. "transitions": PackedFloat32Array(1),
  19. "values": [{
  20. "args": [],
  21. "method": "queue_free"
  22. }]
  23. }
  24. tracks/1/type = "value"
  25. tracks/1/path = NodePath("Sprite2D:modulate")
  26. tracks/1/interp = 1
  27. tracks/1/loop_wrap = true
  28. tracks/1/imported = false
  29. tracks/1/enabled = true
  30. tracks/1/keys = {
  31. "times": PackedFloat32Array(0, 1.03),
  32. "transitions": PackedFloat32Array(1, 1),
  33. "update": 0,
  34. "values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
  35. }
  36. tracks/2/type = "value"
  37. tracks/2/path = NodePath("GPUParticles2D:self_modulate")
  38. tracks/2/interp = 1
  39. tracks/2/loop_wrap = true
  40. tracks/2/imported = false
  41. tracks/2/enabled = true
  42. tracks/2/keys = {
  43. "times": PackedFloat32Array(0, 0.5),
  44. "transitions": PackedFloat32Array(1, 1),
  45. "update": 0,
  46. "values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
  47. }
  48. [node name="Bullet" type="RigidDynamicBody2D"]
  49. continuous_cd = 2
  50. script = ExtResource( 1 )
  51. [node name="GPUParticles2D" type="CPUParticles2D" parent="."]
  52. material = SubResource( 1 )
  53. emitting = false
  54. lifetime = 0.3
  55. speed_scale = 3.0
  56. local_coords = false
  57. texture = ExtResource( 2 )
  58. spread = 0.0
  59. gravity = Vector2(0, 0)
  60. initial_velocity = 1.0
  61. angular_velocity = 38.0
  62. scale_amount = 0.8
  63. [node name="Sprite2D" type="Sprite2D" parent="."]
  64. texture = ExtResource( 2 )
  65. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  66. shape = SubResource( 2 )
  67. [node name="Timer" type="Timer" parent="."]
  68. one_shot = true
  69. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  70. anims/shutdown = SubResource( 3 )
  71. [connection signal="timeout" from="Timer" to="." method="disable"]