fix sky
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
extends Area3D
|
||||
class_name RailSwitch
|
||||
|
||||
@export var rail_a: Path3D
|
||||
@export var rail_b: Path3D
|
||||
@export var switch_to_rail: Path3D # Il binario verso cui deviare
|
||||
|
||||
|
||||
# Cambia direzione dello scambio
|
||||
func toggle_switch() -> void:
|
||||
if switch_to_rail == rail_a:
|
||||
@@ -12,6 +12,6 @@ func toggle_switch() -> void:
|
||||
else:
|
||||
switch_to_rail = rail_a
|
||||
|
||||
func _on_body_entered(body: Node3D) -> void:
|
||||
if body is Train:
|
||||
body.switch_to_rail(switch_to_rail)
|
||||
|
||||
func get_state_name() -> String:
|
||||
return "BINARIO 1" if switch_to_rail == rail_b else "BINARIO 2"
|
||||
|
||||
Reference in New Issue
Block a user