godot-psd-training/UI/CameraSwitch/StationHallB.gd

52 lines
1.4 KiB
GDScript

extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func initButton():
$HBoxContainer/BExitGate.set_pressed_no_signal(true)
$HBoxContainer/BLowerStepSwitch.set_pressed_no_signal(false)
$HBoxContainer/BTVM.set_pressed_no_signal(false)
$HBoxContainer/BInboundGate.set_pressed_no_signal(false)
$HBoxContainer/BUpperStep.set_pressed_no_signal(false)
$HBoxContainer/BLowerStep.set_pressed_no_signal(false)
$HBoxContainer/BGangway.set_pressed_no_signal(false)
func _on_back_pressed():
$"..".back('StaionHall')
func _on_b_gangway_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BGangway)
func _on_b_lower_step_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BLowerStep)
func _on_b_upper_step_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BUpperStep)
func _on_b_exit_gate_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BExitGate)
func _on_b_inbound_gate_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BInboundGate)
func _on_btvm_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BTVM)
func _on_b_lower_step_switch_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BLowerStepSwitch)