[gd_scene load_steps=23 format=2]

[ext_resource path="res://Scripts/Personaje.gd" type="Script" id=1]
[ext_resource path="res://Assets/personaje/pj_globo.png" type="Texture" id=2]
[ext_resource path="res://Assets/personaje/pj_barco_2.png" type="Texture" id=3]

[sub_resource type="AtlasTexture" id=2]
flags = 4
atlas = ExtResource( 3 )
region = Rect2( 0, 0, 296, 165 )

[sub_resource type="AtlasTexture" id=3]
flags = 4
atlas = ExtResource( 3 )
region = Rect2( 296, 0, 296, 165 )

[sub_resource type="AtlasTexture" id=4]
flags = 4
atlas = ExtResource( 3 )
region = Rect2( 592, 0, 296, 165 )

[sub_resource type="AtlasTexture" id=5]
flags = 4
atlas = ExtResource( 3 )
region = Rect2( 888, 0, 296, 165 )

[sub_resource type="AtlasTexture" id=6]
flags = 4
atlas = ExtResource( 3 )
region = Rect2( 1184, 0, 296, 165 )

[sub_resource type="SpriteFrames" id=7]
animations = [ {
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ],
"loop": true,
"name": "idle",
"speed": 15.0
} ]

[sub_resource type="CapsuleShape2D" id=1]
radius = 82.0333
height = 86.2177

[sub_resource type="Animation" id=8]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath("Globo:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 0.0 ]
}

[sub_resource type="Animation" id=9]
resource_name = "move_left"
length = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath("Globo:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.0, 4.0 ]
}

[sub_resource type="Animation" id=10]
resource_name = "move_right"
length = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath("Globo:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 0.0, -4.0 ]
}

[sub_resource type="AnimationNodeAnimation" id=11]
animation = "RESET"

[sub_resource type="AnimationNodeAnimation" id=12]
animation = "move_left"

[sub_resource type="AnimationNodeAnimation" id=13]
animation = "move_right"

[sub_resource type="AnimationNodeStateMachineTransition" id=14]

[sub_resource type="AnimationNodeStateMachineTransition" id=15]

[sub_resource type="AnimationNodeStateMachineTransition" id=16]

[sub_resource type="AnimationNodeStateMachineTransition" id=17]

[sub_resource type="AnimationNodeStateMachine" id=18]
states/RESET/node = SubResource( 11 )
states/RESET/position = Vector2( 383, 121 )
states/move_left/node = SubResource( 12 )
states/move_left/position = Vector2( 177, 121 )
states/move_right/node = SubResource( 13 )
states/move_right/position = Vector2( 599, 121 )
transitions = [ "RESET", "move_right", SubResource( 14 ), "move_right", "RESET", SubResource( 15 ), "RESET", "move_left", SubResource( 16 ), "move_left", "RESET", SubResource( 17 ) ]
graph_offset = Vector2( -109.483, 0 )

[sub_resource type="AnimationNodeStateMachinePlayback" id=19]

[node name="Personaje" type="KinematicBody2D"]
position = Vector2( 400, 519 )
script = ExtResource( 1 )

[node name="Barco" type="AnimatedSprite" parent="."]
position = Vector2( -6, 26 )
frames = SubResource( 7 )
animation = "idle"
playing = true

[node name="Globo" type="Sprite" parent="."]
position = Vector2( 2, -50 )
texture = ExtResource( 2 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = 1.58723
shape = SubResource( 1 )

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/RESET = SubResource( 8 )
anims/move_left = SubResource( 9 )
anims/move_right = SubResource( 10 )

[node name="AnimationTree" type="AnimationTree" parent="."]
tree_root = SubResource( 18 )
anim_player = NodePath("../AnimationPlayer")
active = true
parameters/playback = SubResource( 19 )
