2024-04-25 17:00:46 +08:00
|
|
|
extends Node3D
|
|
|
|
|
2024-04-29 17:13:14 +08:00
|
|
|
var screenDoorALL = []
|
|
|
|
|
|
|
|
##开整体屏蔽门
|
|
|
|
func openScreenDoorALL ()-> void:
|
|
|
|
for child in screenDoorALL:
|
|
|
|
child.openScreenDoor()
|
|
|
|
|
|
|
|
##关整体屏蔽门
|
|
|
|
func closeScreenDoorALL ()-> void:
|
|
|
|
for child in screenDoorALL:
|
|
|
|
child.closeScreenDoor()
|
2024-04-25 17:00:46 +08:00
|
|
|
|
2024-05-06 14:20:57 +08:00
|
|
|
##所有屏蔽门开门到位
|
|
|
|
func allScreenDoorOpen ()-> bool:
|
|
|
|
for child in screenDoorALL:
|
|
|
|
if child.screenDoorState != ScreenDoor.ScreenDoor_State.open :
|
|
|
|
return false
|
|
|
|
return true
|
|
|
|
|
|
|
|
##所有屏蔽门关门到位
|
|
|
|
func allScreenDoorClose ()-> bool:
|
|
|
|
for child in screenDoorALL:
|
|
|
|
if child.screenDoorState != ScreenDoor.ScreenDoor_State.close :
|
|
|
|
return false
|
|
|
|
return true
|
|
|
|
|
2024-05-07 16:33:38 +08:00
|
|
|
##有屏蔽门开门到位
|
2024-05-06 17:28:42 +08:00
|
|
|
func hasScreenDoorOpen ()-> bool:
|
|
|
|
for child in screenDoorALL:
|
|
|
|
if child.screenDoorState == ScreenDoor.ScreenDoor_State.open :
|
|
|
|
return true
|
|
|
|
return false
|
|
|
|
|
2024-04-25 17:00:46 +08:00
|
|
|
func _ready() -> void:
|
|
|
|
var screenDoor_scene = preload("res://sceen/platform/screenDoor.tscn")
|
|
|
|
|
|
|
|
for i in range(1, 5):
|
|
|
|
var screenDoorInstance = screenDoor_scene.instantiate()
|
|
|
|
add_child(screenDoorInstance)
|
2024-04-29 17:13:14 +08:00
|
|
|
screenDoorALL.append(screenDoorInstance)
|
2024-04-25 17:47:45 +08:00
|
|
|
screenDoorInstance.position.x=(i-1)*4.385
|
2024-04-25 17:00:46 +08:00
|
|
|
screenDoorInstance.name = 'screenDoor{0}'.format([i])
|
|
|
|
screenDoorInstance.connect("clickLcbSignalAndSent",Callable($LCB,"_on_screen_door_click_lcb_signal"))
|
2024-04-30 16:02:08 +08:00
|
|
|
screenDoorInstance.connect("clicksScreenDoorSignal",Callable($ScreenDoorOperate,"_on_screen_door_click_signal"))
|
2024-05-11 16:51:19 +08:00
|
|
|
screenDoorInstance.connect("screenDoorOpenSignal",Callable($"..","emitScreenDoorOpenSignal"))
|
|
|
|
screenDoorInstance.connect("screenDoorCloseSignal",Callable($"..","emitScreenDoorCloseSignal"))
|
2024-05-11 10:08:48 +08:00
|
|
|
|
|
|
|
##所有站台点击操作汇总
|
|
|
|
signal allClickPlatformSignal(equipmentName:String,equipmentInfo)
|
2024-05-11 14:10:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
func _on_lcb_all_click_lcb_signal(equipmentName: String,equipmentInfo=null) -> void:
|
|
|
|
allClickPlatformSignal.emit(equipmentName,equipmentInfo)
|
|
|
|
|
|
|
|
|
|
|
|
func _on_psl_all_click_psl_signal(equipmentName: String, equipmentInfo: Variant=null) -> void:
|
|
|
|
allClickPlatformSignal.emit(equipmentName,equipmentInfo)
|
|
|
|
|
|
|
|
|
|
|
|
func _on_jjtc_all_click_jjtc_signal(equipmentName: String, equipmentInfo: Variant=null) -> void:
|
|
|
|
allClickPlatformSignal.emit(equipmentName,equipmentInfo)
|
|
|
|
|
|
|
|
|
|
|
|
func _on_screen_door_operate_all_click_screen_door_signal(equipmentName: String, equipmentInfo: Variant=null) -> void:
|
|
|
|
allClickPlatformSignal.emit(equipmentName,equipmentInfo)
|
2024-05-13 15:44:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
func _on_station_keys_all_click_station_keys_signal(equipmentName: String) -> void:
|
|
|
|
allClickPlatformSignal.emit(equipmentName,$stationKeys)
|