Add new level, collapsable component, knockback component
This commit is contained in:
9
scripts/components/player_death.gd
Normal file
9
scripts/components/player_death.gd
Normal file
@@ -0,0 +1,9 @@
|
||||
class_name PlayerDeathComponent
|
||||
extends Node
|
||||
|
||||
func reset_scene() -> void:
|
||||
get_tree().reload_current_scene()
|
||||
|
||||
func _on_health_component_on_death() -> void:
|
||||
# todo: play audio on death
|
||||
call_deferred("reset_scene")
|
Reference in New Issue
Block a user