fix sky
This commit is contained in:
@@ -9,6 +9,10 @@ extends Node3D
|
||||
@onready var switch_label : Label = $HUD/switch_label
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_update_switch_status()
|
||||
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
_update_ui()
|
||||
|
||||
@@ -31,17 +35,16 @@ func _update_ui() -> void:
|
||||
func _toggle_rail() -> void:
|
||||
if train and rail_switch:
|
||||
rail_switch.toggle_switch()
|
||||
train.switch_to_rail(rail_switch.switch_to_rail)
|
||||
|
||||
#train.switch_to_rail(rail_switch.switch_to_rail)
|
||||
#_update_switch_status()
|
||||
|
||||
|
||||
func _update_switch_status():
|
||||
if not switch_label:
|
||||
return
|
||||
|
||||
#if rail_switch:
|
||||
#var state_name = rail_switch.get_state_name()
|
||||
#var color = Color.YELLOW if rail_switch.current_state == rail_switch.SwitchState.LEFT else Color.CYAN
|
||||
#switch_label.text = "Scambio: %s" % state_name
|
||||
#switch_label.add_theme_color_override("font_color", color)
|
||||
#else:
|
||||
#switch_label.text = "Scambio: N/A"
|
||||
if rail_switch:
|
||||
var state_name = rail_switch.get_state_name()
|
||||
switch_label.text = "Scambio: %s" % state_name
|
||||
else:
|
||||
switch_label.text = "Scambio: N/A"
|
||||
|
||||
Reference in New Issue
Block a user