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.

27 lines
682 B

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