diff --git a/scripts/Base/base.gd b/scripts/Base/base.gd index 598e859..b21b4d9 100644 --- a/scripts/Base/base.gd +++ b/scripts/Base/base.gd @@ -44,25 +44,24 @@ func on_dock_requested(): dock_ready() func gate_area_body_entered(body): - if body is PlayerShip: + if body.ship is PlayerShip: touching_gate = true func gate_area_body_exited(body): - if body is PlayerShip: + if body.ship is PlayerShip: touching_gate = false func dock_area_body_entered(body): - if body is PlayerShip: + if body.ship is PlayerShip: touching_dock = true func dock_area_body_exited(body): - if body is PlayerShip: + if body.ship is PlayerShip: touching_dock = false func _process(_delta): if dock_state == DockState.Process: var distance_to_player = global_position.distance_to(player_ship.global_position) - print(touching_dock, " ", touching_gate) if touching_dock and !touching_gate: dock_busy() if !touching_dock and !touching_gate and distance_to_player > 2048: @@ -70,7 +69,6 @@ func _process(_delta): ## Sets dock state to Ready func dock_ready(): - print("no shit") dock_state = DockState.Ready gate_static.visible = true gate_static.process_mode = Node.PROCESS_MODE_INHERIT @@ -80,7 +78,6 @@ func dock_ready(): touching_dock = false ## Sets dock state to Process func dock_process(): - print("wanna dock") dock_state = DockState.Process gate_static.visible = false gate_static.process_mode = Node.PROCESS_MODE_DISABLED @@ -97,5 +94,4 @@ func dock_busy(): dock_area.visible = false touching_gate = false touching_dock = true - print("busy kozyzy") # TODO: implement opening the base menu