FireFlower.tscn 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. [gd_scene load_steps=14 format=3 uid="uid://dbjqtjhb2t4cn"]
  2. [ext_resource type="Script" uid="uid://cjkurwybsaywm" path="res://Scripts/Classes/Entities/Items/PowerUpItem.gd" id="1_paqft"]
  3. [ext_resource type="Texture2D" uid="uid://qwqprcst4mtg" path="res://Assets/Sprites/Items/FireFlower.png" id="2_x8n8e"]
  4. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_db8fa"]
  5. [ext_resource type="JSON" path="res://Assets/Sprites/Items/FireFlower.json" id="4_11cns"]
  6. [ext_resource type="Script" uid="uid://bx6r8sjar6cwr" path="res://Scripts/Classes/Components/BasicStaticMovement.gd" id="5_11cns"]
  7. [ext_resource type="Script" uid="uid://d4a7yp6e55u8t" path="res://Scripts/Classes/Components/TrackJoint.gd" id="6_brn7u"]
  8. [sub_resource type="AtlasTexture" id="AtlasTexture_db8fa"]
  9. atlas = ExtResource("2_x8n8e")
  10. region = Rect2(0, 16, 16, 16)
  11. [sub_resource type="AtlasTexture" id="AtlasTexture_11cns"]
  12. atlas = ExtResource("2_x8n8e")
  13. region = Rect2(16, 16, 16, 16)
  14. [sub_resource type="AtlasTexture" id="AtlasTexture_brn7u"]
  15. atlas = ExtResource("2_x8n8e")
  16. region = Rect2(32, 16, 16, 16)
  17. [sub_resource type="AtlasTexture" id="AtlasTexture_fwmx2"]
  18. atlas = ExtResource("2_x8n8e")
  19. region = Rect2(48, 16, 16, 16)
  20. [sub_resource type="SpriteFrames" id="SpriteFrames_gid51"]
  21. animations = [{
  22. "frames": [{
  23. "duration": 1.0,
  24. "texture": SubResource("AtlasTexture_db8fa")
  25. }, {
  26. "duration": 1.0,
  27. "texture": SubResource("AtlasTexture_11cns")
  28. }, {
  29. "duration": 1.0,
  30. "texture": SubResource("AtlasTexture_brn7u")
  31. }, {
  32. "duration": 1.0,
  33. "texture": SubResource("AtlasTexture_fwmx2")
  34. }],
  35. "loop": true,
  36. "name": &"default",
  37. "speed": 15.0
  38. }]
  39. [sub_resource type="RectangleShape2D" id="RectangleShape2D_16uf3"]
  40. size = Vector2(8, 4)
  41. [sub_resource type="RectangleShape2D" id="RectangleShape2D_kjjbq"]
  42. size = Vector2(8, 8)
  43. [node name="FireFlower" type="CharacterBody2D"]
  44. z_index = -1
  45. collision_layer = 8
  46. collision_mask = 2
  47. script = ExtResource("1_paqft")
  48. power_up_state = "Fire"
  49. metadata/_custom_type_script = "uid://cjkurwybsaywm"
  50. [node name="Sprite" type="AnimatedSprite2D" parent="."]
  51. position = Vector2(0, -8)
  52. sprite_frames = SubResource("SpriteFrames_gid51")
  53. autoplay = "default"
  54. frame_progress = 0.157931
  55. [node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
  56. script = ExtResource("3_db8fa")
  57. node_to_affect = NodePath("..")
  58. property_name = "sprite_frames"
  59. resource_json = ExtResource("4_11cns")
  60. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  61. [node name="Hitbox" type="Area2D" parent="."]
  62. [node name="Shape" type="CollisionShape2D" parent="Hitbox"]
  63. position = Vector2(0, -10)
  64. shape = SubResource("RectangleShape2D_16uf3")
  65. [node name="Collision" type="CollisionShape2D" parent="."]
  66. position = Vector2(0, -4)
  67. shape = SubResource("RectangleShape2D_kjjbq")
  68. [node name="StaticEntityMovement" type="Node" parent="."]
  69. script = ExtResource("5_11cns")
  70. auto_call = false
  71. [node name="TrackJoint" type="Node" parent="." node_paths=PackedStringArray("movement_node")]
  72. script = ExtResource("6_brn7u")
  73. movement_node = NodePath("../StaticEntityMovement")
  74. metadata/_custom_type_script = "uid://d4a7yp6e55u8t"
  75. [connection signal="physics_tick" from="." to="StaticEntityMovement" method="handle_movement"]
  76. [connection signal="area_entered" from="Hitbox" to="." method="on_area_entered"]