WindArea.tscn 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. [gd_scene load_steps=14 format=3 uid="uid://ccxhom4wrgfv4"]
  2. [ext_resource type="Texture2D" uid="uid://dy3p03djelkb3" path="res://Assets/Sprites/Particles/Leaves.png" id="1_0tjo2"]
  3. [ext_resource type="Script" uid="uid://d3kftxro4bfnv" path="res://Scripts/Classes/Entities/Objects/WindArea.gd" id="1_68lil"]
  4. [ext_resource type="AudioStream" uid="uid://g5cjhcnpp1fp" path="res://Assets/Audio/SFX/Wind.wav" id="3_qar1j"]
  5. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_sbjyn"]
  6. [ext_resource type="Script" uid="uid://cq6f682453q6o" path="res://Scripts/Classes/Components/ResourceSetter.gd" id="4_8c2la"]
  7. [ext_resource type="JSON" path="res://Assets/Sprites/Particles/WindParticles.json" id="4_qvx5e"]
  8. [ext_resource type="Script" uid="uid://cmvlgsjmsk0v5" path="res://Scripts/Classes/Resources/ThemedResource.gd" id="5_3arhp"]
  9. [sub_resource type="RectangleShape2D" id="RectangleShape2D_68lil"]
  10. size = Vector2(16, 16)
  11. [sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_qar1j"]
  12. particles_animation = true
  13. particles_anim_h_frames = 2
  14. particles_anim_v_frames = 1
  15. particles_anim_loop = false
  16. [sub_resource type="Curve" id="Curve_0tjo2"]
  17. _data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.894444, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
  18. point_count = 3
  19. [sub_resource type="CurveTexture" id="CurveTexture_8c2la"]
  20. curve = SubResource("Curve_0tjo2")
  21. [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_wu018"]
  22. particle_flag_disable_z = true
  23. emission_shape_scale = Vector3(1, 15, 1)
  24. emission_shape = 3
  25. emission_box_extents = Vector3(1, 8, 1)
  26. spread = 0.0
  27. initial_velocity_min = 100.0
  28. initial_velocity_max = 500.0
  29. angular_velocity_min = -720.0
  30. angular_velocity_max = 720.0
  31. gravity = Vector3(0, 0, 0)
  32. alpha_curve = SubResource("CurveTexture_8c2la")
  33. anim_offset_max = 1.0
  34. [sub_resource type="Resource" id="Resource_sbjyn"]
  35. script = ExtResource("5_3arhp")
  36. Overworld = ExtResource("3_qar1j")
  37. metadata/_custom_type_script = "uid://cmvlgsjmsk0v5"
  38. [node name="WindArea" type="Area2D"]
  39. script = ExtResource("1_68lil")
  40. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  41. shape = SubResource("RectangleShape2D_68lil")
  42. debug_color = Color(0, 0.6, 0, 0.419608)
  43. [node name="CanvasLayer" type="CanvasLayer" parent="."]
  44. layer = 0
  45. [node name="Control" type="Control" parent="CanvasLayer"]
  46. layout_mode = 3
  47. anchors_preset = 4
  48. anchor_top = 0.5
  49. anchor_bottom = 0.5
  50. grow_vertical = 2
  51. metadata/_edit_use_anchors_ = true
  52. [node name="Particles" type="GPUParticles2D" parent="CanvasLayer/Control"]
  53. unique_name_in_owner = true
  54. material = SubResource("CanvasItemMaterial_qar1j")
  55. position = Vector2(-64, 0)
  56. emitting = false
  57. amount = 64
  58. texture = ExtResource("1_0tjo2")
  59. lifetime = 2.0
  60. process_material = SubResource("ParticleProcessMaterial_wu018")
  61. [node name="ResourceSetterNew" type="Node" parent="CanvasLayer/Control/Particles" node_paths=PackedStringArray("node_to_affect")]
  62. script = ExtResource("3_sbjyn")
  63. node_to_affect = NodePath("..")
  64. property_name = "texture"
  65. mode = 1
  66. resource_json = ExtResource("4_qvx5e")
  67. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  68. [node name="SFX" type="AudioStreamPlayer" parent="."]
  69. stream = ExtResource("3_qar1j")
  70. bus = &"SFX"
  71. [node name="ResourceSetter" type="Node" parent="SFX" node_paths=PackedStringArray("node_to_affect")]
  72. script = ExtResource("4_8c2la")
  73. node_to_affect = NodePath("..")
  74. property_name = "stream"
  75. themed_resource = SubResource("Resource_sbjyn")
  76. metadata/_custom_type_script = "uid://cq6f682453q6o"