bullet.tscn 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. [gd_scene load_steps=12 format=3 uid="uid://0qwkkgqdb77r"]
  2. [ext_resource type="Script" path="res://player/bullet/bullet.gd" id="1"]
  3. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_p7q83"]
  4. transparency = 1
  5. blend_mode = 1
  6. shading_mode = 0
  7. albedo_color = Color(0.701961, 0.698039, 0.513726, 1)
  8. [sub_resource type="SphereMesh" id="SphereMesh_gjrxu"]
  9. material = SubResource("StandardMaterial3D_p7q83")
  10. radius = 0.25
  11. height = 0.5
  12. radial_segments = 16
  13. rings = 8
  14. [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_aw6a5"]
  15. albedo_color = Color(0.7, 0.7, 0.7, 1)
  16. metallic = 0.1
  17. roughness = 0.0
  18. emission_enabled = true
  19. emission = Color(1, 0.884824, 0.513098, 1)
  20. emission_energy_multiplier = 3.71
  21. [sub_resource type="Animation" id="Animation_vsjh6"]
  22. length = 0.001
  23. tracks/0/type = "value"
  24. tracks/0/imported = false
  25. tracks/0/enabled = true
  26. tracks/0/path = NodePath("Sphere:scale")
  27. tracks/0/interp = 1
  28. tracks/0/loop_wrap = true
  29. tracks/0/keys = {
  30. "times": PackedFloat32Array(0),
  31. "transitions": PackedFloat32Array(1),
  32. "update": 0,
  33. "values": [Vector3(1, 1, 1)]
  34. }
  35. tracks/1/type = "value"
  36. tracks/1/imported = false
  37. tracks/1/enabled = true
  38. tracks/1/path = NodePath("OmniLight3D:omni_range")
  39. tracks/1/interp = 1
  40. tracks/1/loop_wrap = true
  41. tracks/1/keys = {
  42. "times": PackedFloat32Array(0),
  43. "transitions": PackedFloat32Array(1),
  44. "update": 0,
  45. "values": [5.0]
  46. }
  47. [sub_resource type="Animation" id="Animation_i372c"]
  48. length = 2.0
  49. tracks/0/type = "value"
  50. tracks/0/imported = false
  51. tracks/0/enabled = true
  52. tracks/0/path = NodePath("Sphere:visible")
  53. tracks/0/interp = 1
  54. tracks/0/loop_wrap = true
  55. tracks/0/keys = {
  56. "times": PackedFloat32Array(0, 1.5),
  57. "transitions": PackedFloat32Array(1, 1),
  58. "update": 1,
  59. "values": [true, false]
  60. }
  61. tracks/1/type = "value"
  62. tracks/1/imported = false
  63. tracks/1/enabled = true
  64. tracks/1/path = NodePath("CPUParticles3D:emitting")
  65. tracks/1/interp = 1
  66. tracks/1/loop_wrap = true
  67. tracks/1/keys = {
  68. "times": PackedFloat32Array(0, 1.5),
  69. "transitions": PackedFloat32Array(1, 1),
  70. "update": 1,
  71. "values": [true, false]
  72. }
  73. tracks/2/type = "method"
  74. tracks/2/imported = false
  75. tracks/2/enabled = true
  76. tracks/2/path = NodePath(".")
  77. tracks/2/interp = 1
  78. tracks/2/loop_wrap = true
  79. tracks/2/keys = {
  80. "times": PackedFloat32Array(2),
  81. "transitions": PackedFloat32Array(1),
  82. "values": [{
  83. "args": [],
  84. "method": &"queue_free"
  85. }]
  86. }
  87. tracks/3/type = "value"
  88. tracks/3/imported = false
  89. tracks/3/enabled = true
  90. tracks/3/path = NodePath("Sphere:scale")
  91. tracks/3/interp = 1
  92. tracks/3/loop_wrap = true
  93. tracks/3/keys = {
  94. "times": PackedFloat32Array(0, 1.5),
  95. "transitions": PackedFloat32Array(-2, -2),
  96. "update": 0,
  97. "values": [Vector3(1, 1, 1), Vector3(0, 0, 0)]
  98. }
  99. tracks/4/type = "value"
  100. tracks/4/imported = false
  101. tracks/4/enabled = true
  102. tracks/4/path = NodePath("OmniLight3D:omni_range")
  103. tracks/4/interp = 1
  104. tracks/4/loop_wrap = true
  105. tracks/4/keys = {
  106. "times": PackedFloat32Array(0, 2),
  107. "transitions": PackedFloat32Array(-2, -2),
  108. "update": 0,
  109. "values": [5.0, 0.0]
  110. }
  111. [sub_resource type="AnimationLibrary" id="AnimationLibrary_pyoek"]
  112. _data = {
  113. "RESET": SubResource("Animation_vsjh6"),
  114. "life": SubResource("Animation_i372c")
  115. }
  116. [sub_resource type="SphereMesh" id="SphereMesh_hnt4a"]
  117. material = SubResource("StandardMaterial3D_p7q83")
  118. radius = 0.125
  119. height = 0.25
  120. radial_segments = 16
  121. rings = 8
  122. [sub_resource type="Curve" id="Curve_4e8sm"]
  123. _data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
  124. point_count = 2
  125. [sub_resource type="Gradient" id="Gradient_ic2ol"]
  126. colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
  127. [sub_resource type="SphereShape3D" id="SphereShape3D_vq2ey"]
  128. radius = 0.27
  129. [node name="Bullet" type="RigidBody3D"]
  130. mass = 0.4
  131. script = ExtResource("1")
  132. [node name="Sphere" type="MeshInstance3D" parent="."]
  133. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00159812, 0.0110106, 0.0045104)
  134. visible = false
  135. cast_shadow = 0
  136. mesh = SubResource("SphereMesh_gjrxu")
  137. surface_material_override/0 = SubResource("StandardMaterial3D_aw6a5")
  138. [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
  139. autoplay = "life"
  140. libraries = {
  141. "": SubResource("AnimationLibrary_pyoek")
  142. }
  143. [node name="CPUParticles3D" type="CPUParticles3D" parent="."]
  144. cast_shadow = 0
  145. emitting = false
  146. amount = 16
  147. lifetime = 0.4
  148. mesh = SubResource("SphereMesh_hnt4a")
  149. spread = 0.0
  150. gravity = Vector3(0, 0, 0)
  151. scale_amount_curve = SubResource("Curve_4e8sm")
  152. color_ramp = SubResource("Gradient_ic2ol")
  153. [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
  154. shape = SubResource("SphereShape3D_vq2ey")
  155. [node name="OmniLight3D" type="OmniLight3D" parent="."]
  156. light_color = Color(1, 0.733333, 0.278431, 1)
  157. shadow_enabled = true
  158. shadow_bias = 0.03