[gd_scene load_steps=40 format=2]

[ext_resource path="res://Player/Player.gd" type="Script" id=1]
[ext_resource path="res://Player/Player.png" type="Texture" id=2]

[sub_resource type="CapsuleShape2D" id=1]
radius = 4.0
height = 4.0

[sub_resource type="Animation" id=27]
resource_name = "AttackDown"
length = 0.4
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 36, 37, 38, 39 ]
}
tracks/1/type = "method"
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.4 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [  ],
"method": "attack_aninimation_finished"
} ]
}

[sub_resource type="Animation" id=28]
resource_name = "AttackLeft"
length = 0.4
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 32, 33, 34, 35 ]
}
tracks/1/type = "method"
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.4 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [  ],
"method": "attack_aninimation_finished"
} ]
}

[sub_resource type="Animation" id=29]
resource_name = "AttackRight"
length = 0.4
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 24, 25, 26, 27 ]
}
tracks/1/type = "method"
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.4 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [  ],
"method": "attack_aninimation_finished"
} ]
}

[sub_resource type="Animation" id=30]
resource_name = "AttackUp"
length = 0.4
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 28, 29, 30, 31 ]
}
tracks/1/type = "method"
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.4 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [  ],
"method": "attack_aninimation_finished"
} ]
}

[sub_resource type="Animation" id=9]
resource_name = "IdleDown"
length = 0.1
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
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": 1,
"values": [ 18 ]
}

[sub_resource type="Animation" id=10]
resource_name = "IdleLeft"
length = 0.1
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
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": 1,
"values": [ 12 ]
}

[sub_resource type="Animation" id=7]
resource_name = "IdleRight"
length = 0.1
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0.1 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 0 ]
}

[sub_resource type="Animation" id=8]
resource_name = "IdleUp"
length = 0.1
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
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": 1,
"values": [ 6 ]
}

[sub_resource type="Animation" id=2]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
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 ]
}

[sub_resource type="Animation" id=6]
resource_name = "RunDown"
length = 0.6
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 19, 19, 21, 22, 23, 18 ]
}

[sub_resource type="Animation" id=4]
resource_name = "RunLeft"
length = 0.6
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 13, 14, 15, 16, 17, 12 ]
}

[sub_resource type="Animation" id=3]
resource_name = "RunRight"
length = 0.6
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 1, 2, 3, 4, 5, 0 ]
}

[sub_resource type="Animation" id=5]
resource_name = "RunUp"
length = 0.6
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 7, 8, 9, 10, 11, 7 ]
}

[sub_resource type="AnimationNodeAnimation" id=31]
animation = "AttackLeft"

[sub_resource type="AnimationNodeAnimation" id=32]
animation = "AttackDown"

[sub_resource type="AnimationNodeAnimation" id=33]
animation = "AttackRight"

[sub_resource type="AnimationNodeAnimation" id=34]
animation = "AttackUp"

[sub_resource type="AnimationNodeBlendSpace2D" id=35]
blend_point_0/node = SubResource( 31 )
blend_point_0/pos = Vector2( -1, 0 )
blend_point_1/node = SubResource( 32 )
blend_point_1/pos = Vector2( 0, 1.1 )
blend_point_2/node = SubResource( 33 )
blend_point_2/pos = Vector2( 1, 0 )
blend_point_3/node = SubResource( 34 )
blend_point_3/pos = Vector2( 0, -1.1 )
min_space = Vector2( -1, -1.1 )
max_space = Vector2( 1, 1.1 )
blend_mode = 1

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

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

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

[sub_resource type="AnimationNodeAnimation" id=14]
animation = "IdleUp"

[sub_resource type="AnimationNodeBlendSpace2D" id=15]
blend_point_0/node = SubResource( 11 )
blend_point_0/pos = Vector2( -1, 0 )
blend_point_1/node = SubResource( 12 )
blend_point_1/pos = Vector2( 0, 1.1 )
blend_point_2/node = SubResource( 13 )
blend_point_2/pos = Vector2( 1, 0 )
blend_point_3/node = SubResource( 14 )
blend_point_3/pos = Vector2( 0, -1.1 )
min_space = Vector2( -1, -1.1 )
max_space = Vector2( 1, 1.1 )
blend_mode = 1

[sub_resource type="AnimationNodeAnimation" id=20]
animation = "RunLeft"

[sub_resource type="AnimationNodeAnimation" id=21]
animation = "RunDown"

[sub_resource type="AnimationNodeAnimation" id=22]
animation = "RunRight"

[sub_resource type="AnimationNodeAnimation" id=23]
animation = "RunUp"

[sub_resource type="AnimationNodeBlendSpace2D" id=24]
blend_point_0/node = SubResource( 20 )
blend_point_0/pos = Vector2( -1, 0 )
blend_point_1/node = SubResource( 21 )
blend_point_1/pos = Vector2( 0, 1.1 )
blend_point_2/node = SubResource( 22 )
blend_point_2/pos = Vector2( 1, 0 )
blend_point_3/node = SubResource( 23 )
blend_point_3/pos = Vector2( 0, -1.1 )
min_space = Vector2( -1, -1.1 )
max_space = Vector2( 1, 1.1 )
blend_mode = 1

[sub_resource type="AnimationNodeStateMachineTransition" id=25]

[sub_resource type="AnimationNodeStateMachineTransition" id=26]

[sub_resource type="AnimationNodeStateMachineTransition" id=36]

[sub_resource type="AnimationNodeStateMachineTransition" id=37]

[sub_resource type="AnimationNodeStateMachineTransition" id=38]

[sub_resource type="AnimationNodeStateMachineTransition" id=39]

[sub_resource type="AnimationNodeStateMachine" id=18]
states/Attack/node = SubResource( 35 )
states/Attack/position = Vector2( 321.375, 203.5 )
states/Idle/node = SubResource( 15 )
states/Idle/position = Vector2( 323.5, 96.2812 )
states/Run/node = SubResource( 24 )
states/Run/position = Vector2( 509.5, 96.5 )
transitions = [ "Run", "Idle", SubResource( 25 ), "Idle", "Run", SubResource( 26 ), "Idle", "Attack", SubResource( 36 ), "Attack", "Idle", SubResource( 37 ), "Attack", "Run", SubResource( 38 ), "Run", "Attack", SubResource( 39 ) ]
start_node = "Idle"

[sub_resource type="AnimationNodeStateMachinePlayback" id=19]

[node name="Player" type="KinematicBody2D"]
script = ExtResource( 1 )

[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 0, -9 )
texture = ExtResource( 2 )
hframes = 60

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

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/AttackDown = SubResource( 27 )
anims/AttackLeft = SubResource( 28 )
anims/AttackRight = SubResource( 29 )
anims/AttackUp = SubResource( 30 )
anims/IdleDown = SubResource( 9 )
anims/IdleLeft = SubResource( 10 )
anims/IdleRight = SubResource( 7 )
anims/IdleUp = SubResource( 8 )
anims/RESET = SubResource( 2 )
anims/RunDown = SubResource( 6 )
anims/RunLeft = SubResource( 4 )
anims/RunRight = SubResource( 3 )
anims/RunUp = SubResource( 5 )

[node name="AnimationTree" type="AnimationTree" parent="."]
tree_root = SubResource( 18 )
anim_player = NodePath("../AnimationPlayer")
parameters/playback = SubResource( 19 )
parameters/Attack/blend_position = Vector2( 0, 0 )
parameters/Idle/blend_position = Vector2( 0, 0 )
parameters/Run/blend_position = Vector2( 0, 0 )
