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.

33 lines
883 B

  1. extends "res://scripts/player.gd"
  2. onready var placement = preload("res://scripts/placement.gd").new(self, "res://scenes/heroes/5_portal.tscn")
  3. var radius = 15
  4. # The spaces make the bracket centered, rather than on of the dots
  5. var first_crosshair = " [..."
  6. var second_crosshair = "...] "
  7. # --- Godot overrides ---
  8. func _ready():
  9. placement.start_action = "hero_5_place_portal"
  10. placement.confirm_action = "hero_5_confirm_portal"
  11. placement.delete_action = "hero_5_remove_portal"
  12. placement.max_placed = 100
  13. func _process(delta):
  14. if is_network_master():
  15. placement.place_input(radius)
  16. var is_second = placement.placed.size() % 2 != 0
  17. var crosshair = second_crosshair if is_second else first_crosshair
  18. get_node("MasterOnly/Crosshair").set_text(crosshair)
  19. func _exit_tree():
  20. ._exit_tree()
  21. if placement:
  22. placement.clear()
  23. # --- Player overrides ---
  24. # --- Own ---