diff options
| author | Jan Tuomi <jan.tuomi@valuemotive.com> | 2022-08-15 09:35:35 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan.tuomi@valuemotive.com> | 2022-08-15 09:35:35 +0300 |
| commit | 8b0ce964d2aa5dba186b85abf64b70ffc8216c06 (patch) | |
| tree | 776e6149b78091cd377f6f421839e15186a2cba0 /GlobalData.gd | |
| parent | f3cc4f82624b21dafa19515b69c66a3c8f4fe248 (diff) | |
Add UI
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 |
