feat: sound integration
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 8s
Create tag and build when new code gets to main / Export (push) Successful in 2m17s

This commit is contained in:
2025-08-03 12:41:19 +02:00
parent 130334d315
commit 49ede4a46b
12 changed files with 218 additions and 9 deletions

View File

@ -6,8 +6,8 @@ class_name Damageable
var active = true
signal got_hit
signal die
signal got_hit
func set_active(new_active: bool):
active = new_active
@ -16,9 +16,9 @@ func damage(value: int = 0, direction: Vector2 = Vector2.UP):
if not active:
return
got_hit.emit()
if hitback_velocity > 0:
get_parent().velocity = hitback_velocity * direction
got_hit.emit()
health -= value
if health <= 0: