godot-psd-training/UI/CameraSwitch/StaionHallA.gd
2024-06-18 10:22:05 +08:00

53 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/AExitGate.set_pressed_no_signal(true)
$HBoxContainer/ALowerStepSwitch.set_pressed_no_signal(false)
$HBoxContainer/ATVM.set_pressed_no_signal(false)
$HBoxContainer/AInboundGate.set_pressed_no_signal(false)
$HBoxContainer/AUpperStep.set_pressed_no_signal(false)
$HBoxContainer/ALowerStep.set_pressed_no_signal(false)
$HBoxContainer/AGangway.set_pressed_no_signal(false)
func _on_back_pressed():
$"..".back()
func _on_a_gangway_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.AGangway)
func _on_a_lower_step_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.ALowerStep)
func _on_a_upper_step_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.AUpperStep)
func _on_a_exit_gate_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.AExitGate)
func _on_a_inbound_gate_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.AInboundGate)
func _on_atvm_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.ATVM)
func _on_a_lower_step_switch_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.ALowerStep)