initial implementation of sword attack

This commit is contained in:
2021-12-04 02:28:48 -06:00
parent 7e39fdf2bc
commit f18924dd3d
10 changed files with 203 additions and 89 deletions

View File

@@ -1,16 +1,17 @@
[gd_scene load_steps=20 format=2]
[gd_scene load_steps=21 format=2]
[ext_resource path="res://Player/Player.gd" type="Script" id=1]
[ext_resource path="res://Sprites/Player/Player.png" type="Texture" id=2]
[ext_resource path="res://Sprites/Player/Player_Down.png" type="Texture" id=3]
[ext_resource path="res://Sprites/Player/Player_Up.png" type="Texture" id=4]
[ext_resource path="res://Player/Inventory.tscn" type="PackedScene" id=5]
[ext_resource path="res://Player/Sword.tscn" type="PackedScene" id=7]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 2 ) ],
"frames": [ ExtResource( 3 ) ],
"loop": false,
"name": "look_right",
"name": "look_down",
"speed": 5.0
}, {
"frames": [ ExtResource( 4 ) ],
@@ -23,9 +24,9 @@ animations = [ {
"name": "look_left",
"speed": 5.0
}, {
"frames": [ ExtResource( 3 ) ],
"frames": [ ExtResource( 2 ) ],
"loop": false,
"name": "look_down",
"name": "look_right",
"speed": 5.0
} ]
@@ -220,5 +221,8 @@ parameters/Idle/blend_position = Vector2( 0.0760697, 0 )
[node name="Inventory" parent="." instance=ExtResource( 5 )]
[node name="SwordAnimation" parent="." instance=ExtResource( 7 )]
position = Vector2( 8, -6 )
[connection signal="body_entered" from="Hitbox" to="." method="_on_Hitbox_body_entered"]
[connection signal="update_currency" from="Inventory" to="." method="_on_Inventory_update_currency"]