13 lines
311 B
GDScript
13 lines
311 B
GDScript
class_name Character
|
|
extends Control
|
|
|
|
|
|
@export var charName := "Character"
|
|
@export var maxHealth := 10
|
|
@export var dmgTaken := 0
|
|
|
|
func _init() -> void:
|
|
%CharacterName.text = self.charName
|
|
%CharacterMaxHealth.text = str(self.maxHealth)
|
|
%CharacterCurrHealth.text = str(self.maxHealth - self.dmgTaken)
|