godot-psd-training/UI/CameraSwitch/dPassageWay.gd
2024-06-21 18:09:22 +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/DEntrance.set_pressed_no_signal(true)
$HBoxContainer/StationHallDExit.set_pressed_no_signal(false)
$HBoxContainer/DPassage.set_pressed_no_signal(false)
func _on_back_pressed():
$"..".back()
func _on_d_passage_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.DPassage)
func _on_d_entrance_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.DEntrance)
func _on_station_hall_d_exit_pressed():
$"..".switchCamera(LargePassengerFlowScene.Camera_name.StationHallDExit)