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

32 lines
783 B
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/CEntrance.set_pressed_no_signal(true)
$HBoxContainer/StationHallCExit.set_pressed_no_signal(false)
$HBoxContainer/CPassage.set_pressed_no_signal(false)
func _on_back_pressed():
$"..".back()
func _on_c_passage_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.StationHallCExit)
func _on_c_entrance_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.CEntrance)
func _on_station_hall_c_exit_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.CPassage)