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

52 lines
1.4 KiB
GDScript3
Raw Normal View History

2024-06-18 08:45:49 +08:00
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
2024-06-18 10:22:05 +08:00
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)
2024-06-18 08:45:49 +08:00
func _on_back_pressed():
$"..".back('StaionHall')
2024-06-18 08:45:49 +08:00
func _on_b_gangway_pressed():
2024-06-18 10:22:05 +08:00
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BGangway)
2024-06-18 08:45:49 +08:00
func _on_b_lower_step_pressed():
2024-06-18 10:22:05 +08:00
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BLowerStep)
2024-06-18 08:45:49 +08:00
func _on_b_upper_step_pressed():
2024-06-18 10:22:05 +08:00
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BUpperStep)
2024-06-18 08:45:49 +08:00
func _on_b_exit_gate_pressed():
2024-06-18 10:22:05 +08:00
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BExitGate)
2024-06-18 08:45:49 +08:00
func _on_b_inbound_gate_pressed():
2024-06-18 10:22:05 +08:00
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BInboundGate)
2024-06-18 08:45:49 +08:00
func _on_btvm_pressed():
2024-06-18 10:22:05 +08:00
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BTVM)
2024-06-18 08:45:49 +08:00
func _on_b_lower_step_switch_pressed():
2024-06-18 10:22:05 +08:00
$"..".switchCamera(LargePassengerFlowScene.Camera_name.BLowerStepSwitch)