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
737 B

  1. extends StaticBody
  2. var maker_node
  3. var material
  4. func _ready():
  5. get_node("CollisionShape").disabled = true
  6. func init(maker):
  7. maker_node = maker
  8. material = get_node("MeshInstance").get_surface_material(0)
  9. if not material:
  10. material = SpatialMaterial.new()
  11. get_node("MeshInstance").set_surface_material(0, material)
  12. material.flags_transparent = true
  13. material.albedo_color.a = 0.5
  14. func place():
  15. # Originally, the ghost is disabled to avoid weird physics
  16. get_node("CollisionShape").disabled = false
  17. material.flags_transparent = false
  18. func make_last():
  19. material.flags_transparent = true
  20. material.albedo_color.a = 0.9
  21. func out_of_range():
  22. material.albedo_color.a = 0.2
  23. func within_range():
  24. material.albedo_color.a = 0.5