feat: final cutscene and full game loop
This commit is contained in:
@ -15,12 +15,12 @@ func set_active(new_active: bool):
|
||||
func damage(value: int = 0, direction: Vector2 = Vector2.UP):
|
||||
if not active:
|
||||
return
|
||||
|
||||
|
||||
if hitback_velocity > 0:
|
||||
get_parent().velocity = hitback_velocity * direction
|
||||
got_hit.emit()
|
||||
|
||||
health -= value
|
||||
if health <= 0:
|
||||
die.emit()
|
||||
return
|
||||
|
||||
get_parent().velocity = hitback_velocity * direction
|
||||
got_hit.emit()
|
||||
|
||||
|
Reference in New Issue
Block a user