diff options
Diffstat (limited to 'GlobalData.gd')
| -rw-r--r-- | GlobalData.gd | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/GlobalData.gd b/GlobalData.gd index 1ee67a1..8cf9d94 100644 --- a/GlobalData.gd +++ b/GlobalData.gd @@ -4,11 +4,16 @@ export(int) var player_hp = 3 export(float) var GRAVITY: float = 1200 export(float) var MAX_FALL_SPEED: float = 1200 +signal player_hp_changed + +func add_player_hp(delta: int): + player_hp += delta + emit_signal("player_hp_changed", player_hp) + # Called when the node enters the scene tree for the first time. func _ready(): pass # Replace with function body. - # Called every frame. 'delta' is the elapsed time since the previous frame. #func _process(delta): # pass |
