A team game with an emphasis on movement (with no shooting), inspired by Overwatch and Zineth
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.

28 lines
641 B

  1. extends Control
  2. onready var hero = get_node("../..")
  3. onready var bar = get_node("Bar")
  4. onready var available = get_node("Available")
  5. export var cost = 1
  6. export var ability_name = "Ability"
  7. export var display_progress = true
  8. # This is intended to be public
  9. var disabled = false
  10. func _ready():
  11. get_node("Name").text = ability_name
  12. func _process(delta):
  13. if disabled:
  14. available.hide()
  15. bar.value = 0
  16. else:
  17. if display_progress:
  18. if cost == 0:
  19. bar.value = 100 if hero.switch_charge > 0 else 0
  20. else:
  21. bar.value = 100 * hero.switch_charge / cost
  22. if hero.switch_charge > cost:
  23. available.show()
  24. else:
  25. available.hide()