2024-06-17 19:49:24 +08:00
|
|
|
extends Node2D
|
|
|
|
|
2024-06-21 16:30:29 +08:00
|
|
|
##是否允许操作
|
|
|
|
var allowHandle :bool = true
|
2024-06-17 19:49:24 +08:00
|
|
|
|
2024-06-21 16:30:29 +08:00
|
|
|
##所有ShortTool点击操作汇总
|
|
|
|
signal AllClickCameraSwitchUi(equipmentName:String,equipmentInfo)
|
2024-06-17 19:49:24 +08:00
|
|
|
|
2024-06-21 16:30:29 +08:00
|
|
|
func switchCamera(camera,emit=true):
|
|
|
|
if emit :
|
|
|
|
AllClickCameraSwitchUi.emit($"..".camera_map[camera],self)
|
|
|
|
if !allowHandle :
|
|
|
|
return
|
2024-06-17 19:49:24 +08:00
|
|
|
$"..".switchCamera(camera)
|
|
|
|
|
|
|
|
func uiChange(ui):
|
|
|
|
if ui == 'APassageway':
|
|
|
|
$CameraSwitch.hide()
|
|
|
|
$aPassageway.show()
|
2024-06-18 10:22:05 +08:00
|
|
|
$aPassageway.initButton()
|
2024-06-17 19:49:24 +08:00
|
|
|
elif ui == 'BPassageway':
|
|
|
|
$CameraSwitch.hide()
|
|
|
|
$bPassageway.show()
|
2024-06-18 10:22:05 +08:00
|
|
|
$bPassageway.initButton()
|
2024-06-17 19:49:24 +08:00
|
|
|
elif ui == 'CPassageway':
|
|
|
|
$CameraSwitch.hide()
|
2024-06-18 08:45:49 +08:00
|
|
|
$CPassageway.show()
|
2024-06-18 10:22:05 +08:00
|
|
|
$CPassageway.initButton()
|
2024-06-17 19:49:24 +08:00
|
|
|
elif ui == 'DPassageway':
|
|
|
|
$CameraSwitch.hide()
|
2024-06-18 10:22:05 +08:00
|
|
|
$DPassageWay.show()
|
|
|
|
$DPassageWay.initButton()
|
|
|
|
elif ui == 'VehicleControlRoom':
|
|
|
|
$CameraSwitch.hide()
|
|
|
|
$VehicleControlRoom.show()
|
|
|
|
$VehicleControlRoom.initButton()
|
|
|
|
elif ui == 'StaionHallA':
|
|
|
|
$CameraSwitch.hide()
|
|
|
|
$StaionHallA.show()
|
|
|
|
$StaionHallA.initButton()
|
|
|
|
elif ui == 'StaionHallB':
|
|
|
|
$CameraSwitch.hide()
|
|
|
|
$StationHallB.show()
|
|
|
|
$StationHallB.initButton()
|
2024-06-18 08:45:49 +08:00
|
|
|
|
2024-07-05 18:22:52 +08:00
|
|
|
func back(fatherNode=''):
|
|
|
|
if fatherNode == 'StaionHall':
|
|
|
|
AllClickCameraSwitchUi.emit('StaionHallBack',self)
|
|
|
|
else :
|
|
|
|
AllClickCameraSwitchUi.emit('Back',self)
|
2024-06-21 16:30:29 +08:00
|
|
|
if !allowHandle :
|
|
|
|
return
|
2024-06-18 08:45:49 +08:00
|
|
|
$CameraSwitch.show()
|
|
|
|
$aPassageway.hide()
|
|
|
|
$bPassageway.hide()
|
|
|
|
$CPassageway.hide()
|
|
|
|
$DPassageWay.hide()
|
|
|
|
$StaionHallA.hide()
|
|
|
|
$StationHallB.hide()
|
|
|
|
$VehicleControlRoom.hide()
|