Bullet.tscn 2.1 KB

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