[gd_scene load_steps=14 format=3 uid="uid://dbjqtjhb2t4cn"]

[ext_resource type="Script" uid="uid://cjkurwybsaywm" path="res://Scripts/Classes/Entities/Items/PowerUpItem.gd" id="1_paqft"]
[ext_resource type="Texture2D" uid="uid://qwqprcst4mtg" path="res://Assets/Sprites/Items/FireFlower.png" id="2_x8n8e"]
[ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_db8fa"]
[ext_resource type="JSON" path="res://Assets/Sprites/Items/FireFlower.json" id="4_11cns"]
[ext_resource type="Script" uid="uid://bx6r8sjar6cwr" path="res://Scripts/Classes/Components/BasicStaticMovement.gd" id="5_11cns"]
[ext_resource type="Script" uid="uid://d4a7yp6e55u8t" path="res://Scripts/Classes/Components/TrackJoint.gd" id="6_brn7u"]

[sub_resource type="AtlasTexture" id="AtlasTexture_db8fa"]
atlas = ExtResource("2_x8n8e")
region = Rect2(0, 16, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_11cns"]
atlas = ExtResource("2_x8n8e")
region = Rect2(16, 16, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_brn7u"]
atlas = ExtResource("2_x8n8e")
region = Rect2(32, 16, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_fwmx2"]
atlas = ExtResource("2_x8n8e")
region = Rect2(48, 16, 16, 16)

[sub_resource type="SpriteFrames" id="SpriteFrames_gid51"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_db8fa")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_11cns")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_brn7u")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fwmx2")
}],
"loop": true,
"name": &"default",
"speed": 15.0
}]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_16uf3"]
size = Vector2(8, 4)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_kjjbq"]
size = Vector2(8, 8)

[node name="FireFlower" type="CharacterBody2D"]
z_index = -1
collision_layer = 8
collision_mask = 2
script = ExtResource("1_paqft")
power_up_state = "Fire"
metadata/_custom_type_script = "uid://cjkurwybsaywm"

[node name="Sprite" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -8)
sprite_frames = SubResource("SpriteFrames_gid51")
autoplay = "default"
frame_progress = 0.157931

[node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("3_db8fa")
node_to_affect = NodePath("..")
property_name = "sprite_frames"
resource_json = ExtResource("4_11cns")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"

[node name="Hitbox" type="Area2D" parent="."]

[node name="Shape" type="CollisionShape2D" parent="Hitbox"]
position = Vector2(0, -10)
shape = SubResource("RectangleShape2D_16uf3")

[node name="Collision" type="CollisionShape2D" parent="."]
position = Vector2(0, -4)
shape = SubResource("RectangleShape2D_kjjbq")

[node name="StaticEntityMovement" type="Node" parent="."]
script = ExtResource("5_11cns")
auto_call = false

[node name="TrackJoint" type="Node" parent="." node_paths=PackedStringArray("movement_node")]
script = ExtResource("6_brn7u")
movement_node = NodePath("../StaticEntityMovement")
metadata/_custom_type_script = "uid://d4a7yp6e55u8t"

[connection signal="physics_tick" from="." to="StaticEntityMovement" method="handle_movement"]
[connection signal="area_entered" from="Hitbox" to="." method="on_area_entered"]
