fixed building walls and moving cassettes around
This commit is contained in:
@@ -129,10 +129,15 @@ func process_looking_at_tower() -> void:
|
||||
func build_wall() -> void:
|
||||
if point and valid_point and hero.currency >= Data.wall_cost:
|
||||
hero.currency -= Data.wall_cost
|
||||
level.set_wall(point, multiplayer.get_unique_id())
|
||||
networked_set_wall.rpc(point.node_id, multiplayer.get_unique_id())
|
||||
wall_preview.visible = false
|
||||
|
||||
|
||||
@rpc("reliable", "call_local")
|
||||
func networked_set_wall(node_id: int, peer_id: int) -> void:
|
||||
level.set_wall(node_id, peer_id)
|
||||
|
||||
|
||||
func refund_wall(wall: TowerBase) -> void:
|
||||
if !is_instance_valid(wall):
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user