|
- extends Object
-
- class_name PlayerInfos
-
- # curHp
- var curHp : int = 10 setget curHp_set, curHp_get
- signal curHp_update
-
- func curHp_set(value):
- curHp = value
- emit_signal("curHp_update", value)
-
- func curHp_get():
- return curHp
-
- # maxHp
- var maxHp : int = 10 setget maxHp_set, maxHp_get
- signal maxHp_update
-
- func maxHp_set(value):
- maxHp = value
- emit_signal("maxHp_update", value)
-
- func maxHp_get():
- return maxHp
-
- # damage
- var damage : int = 1 setget damage_set, damage_get
- signal damage_update
-
- func damage_set(value):
- damage = value
- emit_signal("damage_update", value)
-
- func damage_get():
- return damage
-
- # gold
- var gold : int = 0 setget gold_set, gold_get
- signal gold_update
-
- func gold_set(value):
- gold = value
- emit_signal("gold_update", value)
-
- func gold_get():
- return gold
-
- func reset():
- curHp = maxHp
- emit_signal("curHp_update", curHp)
- gold = 0
- emit_signal("gold_update", gold)
|