You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

49 lines
782 B

  1. extends Object
  2. class_name PlayerInfos
  3. # curHp
  4. var curHp : int = 10 setget curHp_set, curHp_get
  5. signal curHp_update
  6. func curHp_set(value):
  7. curHp = value
  8. emit_signal("curHp_update", value)
  9. func curHp_get():
  10. return curHp
  11. # maxHp
  12. var maxHp : int = 10 setget maxHp_set, maxHp_get
  13. signal maxHp_update
  14. func maxHp_set(value):
  15. maxHp = value
  16. emit_signal("maxHp_update", value)
  17. func maxHp_get():
  18. return maxHp
  19. # damage
  20. var damage : int = 1 setget damage_set, damage_get
  21. signal damage_update
  22. func damage_set(value):
  23. damage = value
  24. emit_signal("damage_update", value)
  25. func damage_get():
  26. return damage
  27. # gold
  28. var gold : int = 0 setget gold_set, gold_get
  29. signal gold_update
  30. func gold_set(value):
  31. gold = value
  32. emit_signal("gold_update", value)
  33. func gold_get():
  34. return gold