initial implementation of sword attack
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user