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.

25 lines
718 B

  1. extends StaticBody
  2. var maker_node
  3. var touch_charge = 1
  4. func init(maker, color):
  5. maker_node = maker
  6. var mat = SpatialMaterial.new()
  7. color.a = 0.5
  8. mat.flags_transparent = true
  9. mat.albedo_color = color
  10. get_node("MeshInstance").set_surface_material(0, mat)
  11. func place():
  12. # Originally, the wall is disabled to avoid weird physics
  13. get_node("CollisionShape").disabled = false
  14. get_node("MeshInstance").get_surface_material(0).flags_transparent = false
  15. func _process(delta):
  16. pass
  17. # var cols = get_colliding_bodies()
  18. # for col in cols:
  19. # if col != maker_node: # Don't count ourself. This encourages teamwork and discourages wall-touching-for-charge abuse
  20. # maker_node.switch_charge += touch_charge * delta