fixed building walls and moving cassettes around
This commit is contained in:
@@ -116,6 +116,7 @@ func spawn_level(scene: PackedScene) -> void:
|
||||
level = scene.instantiate() as Level
|
||||
var flow_field: FlowField = FlowField.new()
|
||||
level.flow_field = flow_field
|
||||
level.name = "level"
|
||||
level.add_child(flow_field)
|
||||
flow_field.data = FlowFieldTool.load_flow_field_from_disc(level_config.zone.flow_field_data_path)
|
||||
level.load_flow_field()
|
||||
|
||||
@@ -49,13 +49,16 @@ func disable_path_tower_frames() -> void:
|
||||
tower_frames[node].visible = false
|
||||
|
||||
|
||||
func set_wall(point: FlowNodeData, caller_id: int) -> void:
|
||||
func set_wall(node_id: int, caller_id: int) -> void:
|
||||
var point: FlowNodeData
|
||||
for node: FlowNodeData in flow_field.data.nodes:
|
||||
if node.node_id == node_id:
|
||||
point = node
|
||||
point.traversable = false
|
||||
flow_field.calculate()
|
||||
flow_field.path_updated.emit()
|
||||
if is_multiplayer_authority():
|
||||
spawn_wall(point, wall_id, caller_id)
|
||||
wall_id += 1
|
||||
spawn_wall(point, wall_id, caller_id)
|
||||
wall_id += 1
|
||||
|
||||
|
||||
func remove_wall(point: FlowNodeData) -> void:
|
||||
|
||||
Reference in New Issue
Block a user