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

@@ -56,7 +56,7 @@ func _on_Hitbox_body_entered(body: Node) -> void:
if health_index != 0:
health_index -= 1
#hud.update_health(HEALTH_SLICES[health_index])
hud.update_health(HEALTH_SLICES[health_index])
return
@@ -73,4 +73,8 @@ func _input(event: InputEvent) -> void:
if img.save_png('user://Screenshot_%d%d%d_%d.png' % [time.year, time.month, time.day, time_msecs]) != OK:
print('ERROR: Failed saving screenshot.')
if event.is_action_pressed("player_attack"):
$SwordAnimation/SwordAttack.play("swing")
return