[gd_scene load_steps=13 format=2]

[ext_resource path="res://Assets/Fonts/Default.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://Entities/Entity.gd" type="Script" id=2]
[ext_resource path="res://Entities/CurrentEffects.gd" type="Script" id=3]
[ext_resource path="res://UI/EffectIcons.tscn" type="PackedScene" id=4]

[sub_resource type="Animation" id=1]
resource_name = "AttackSwing"
length = 0.7
tracks/0/type = "value"
tracks/0/path = NodePath("DrawPivot/Weapon:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.3, 0.4, 0.5, 0.7 ),
"transitions": PoolRealArray( 0.203063, 1, 1, 0.31864, 0.203063 ),
"update": 0,
"values": [ Vector2( -5, -6 ), Vector2( -9, -12 ), Vector2( 8, -12 ), Vector2( 8, -5 ), Vector2( -5, -6 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("DrawPivot/Weapon:rotation_degrees")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.3, 0.5, 0.6 ),
"transitions": PoolRealArray( 0.217638, 1, 1, 1 ),
"update": 0,
"values": [ 0.0, -89.9999, 10.0, 0.0 ]
}
tracks/2/type = "method"
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0.5 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [  ],
"method": "hit"
} ]
}
tracks/3/type = "method"
tracks/3/path = NodePath(".")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0.7 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [  ],
"method": "attack_animation_finished"
} ]
}
tracks/4/type = "value"
tracks/4/path = NodePath(".:can_block")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/keys = {
"times": PoolRealArray( 0, 0.4 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ true, false ]
}

[sub_resource type="Animation" id=2]
resource_name = "Block"
length = 1.5
tracks/0/type = "value"
tracks/0/path = NodePath("DrawPivot/Weapon:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.2, 1, 1.2, 1.5 ),
"transitions": PoolRealArray( 1, 1, 1, 0.31864, 0.203063 ),
"update": 0,
"values": [ Vector2( -5, -19 ), Vector2( 6, -19 ), Vector2( 6, -19 ), Vector2( 5, -6 ), Vector2( -5, -6 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("DrawPivot/Weapon:rotation_degrees")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.2, 1, 1.2, 1.4 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ -60.0, 44.9999, 44.9999, 22.5, 0.0 ]
}
tracks/2/type = "method"
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0.2 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [  ],
"method": "block_effect"
} ]
}
tracks/3/type = "method"
tracks/3/path = NodePath(".")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 1.5 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [  ],
"method": "attack_animation_finished"
} ]
}

[sub_resource type="Animation" id=3]

[sub_resource type="Animation" id=4]
length = 1.5
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("DrawPivot/Weapon:position")
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": [ Vector2( -5, -6 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("DrawPivot/Weapon:rotation_degrees")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 0.0 ]
}

[sub_resource type="Animation" id=5]

[sub_resource type="StyleBoxFlat" id=6]
bg_color = Color( 0.211765, 0.592157, 0.25098, 1 )
anti_aliasing = false

[sub_resource type="StyleBoxFlat" id=7]
bg_color = Color( 0.0392157, 0.054902, 0.117647, 1 )
expand_margin_left = 1.0
expand_margin_right = 1.0
expand_margin_top = 1.0
expand_margin_bottom = 1.0
anti_aliasing = false

[sub_resource type="DynamicFont" id=8]
extra_spacing_top = -5
font_data = ExtResource( 1 )

[node name="Entity" type="Position2D"]
script = ExtResource( 2 )

[node name="CurrentEffects" type="Node" parent="."]
script = ExtResource( 3 )

[node name="DrawPivot" type="Position2D" parent="."]

[node name="Sprite" type="Sprite" parent="DrawPivot"]

[node name="Weapon" type="Position2D" parent="DrawPivot"]
position = Vector2( -5, -6 )

[node name="Tween" type="Tween" parent="."]

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "Idle"
anims/AttackSwing = SubResource( 1 )
anims/Block = SubResource( 2 )
anims/Hurt = SubResource( 3 )
anims/Idle = SubResource( 4 )
anims/Walk = SubResource( 5 )

[node name="HealthBar" type="ProgressBar" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -13.0
margin_top = -25.0
margin_right = 13.0
margin_bottom = -23.0
custom_styles/fg = SubResource( 6 )
custom_styles/bg = SubResource( 7 )
value = 50.0
percent_visible = false
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Label" type="Label" parent="."]
visible = false
margin_left = -12.0
margin_top = -26.0
margin_right = 12.0
margin_bottom = -18.0
custom_fonts/font = SubResource( 8 )
text = "HP"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}

[node name="EffectIcons" parent="." instance=ExtResource( 4 )]
