Health meter

This commit is contained in:
Felipe M 2021-02-04 20:04:56 +01:00
parent edadd138b0
commit 0f5e075a54
Signed by: fmartingr
GPG key ID: 716BC147715E716F
4 changed files with 47 additions and 10 deletions

View file

@ -0,0 +1,12 @@
extends Control
var PlayerStats = ResourceLoader.PlayerStats
onready var full = $Full
func _ready():
PlayerStats.connect("player_health_changed", self, "_on_player_health_changed")
func _on_player_health_changed(value):
full.rect_size.x = value * 5 + 1