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.

22 lines
640 B

  1. extends "res://scripts/player.gd"
  2. var is_repelling = false
  3. var overlap_charge = 2
  4. func _process(delta):
  5. if is_network_master():
  6. if Input.is_action_just_pressed("hero_2_switch_gravity"):
  7. # Press button twice to cancel
  8. rpc("switch_gravity")
  9. is_repelling = !is_repelling
  10. if is_repelling:
  11. get_node("MasterOnly/Crosshair").set_text("/\\")
  12. else:
  13. get_node("MasterOnly/Crosshair").set_text("\\/")
  14. var overlapping = get_node("Area").get_overlapping_bodies().size()
  15. switch_charge += delta * overlap_charge * overlapping
  16. sync func switch_gravity():
  17. var area = get_node("Area")
  18. area.set_gravity(-area.get_gravity())