total提供所有点击节点的信息(待完善)
This commit is contained in:
parent
40f6b793b2
commit
5b08f1b7c1
@ -3,6 +3,7 @@ extends Window
|
||||
func _on_jjtc_click_jjtc_signal():
|
||||
self.show()
|
||||
$"../stationKeys".onShowWindow(StationKeyWindow.WindowType.JJTC)
|
||||
$"..".allClickPlatformSignal.emit('JJTC')
|
||||
|
||||
|
||||
func _on_close_requested():
|
||||
|
@ -11,6 +11,7 @@ func _on_screen_door_click_lcb_signal(screenDoor: Variant) -> void:
|
||||
$"../stationKeys".onShowWindow(StationKeyWindow.WindowType.LCB,screenDoor.lcbKey.keyName)
|
||||
currenScreenDoor=screenDoor
|
||||
resetState(screenDoor.lcbKey)
|
||||
$"..".allClickPlatformSignal.emit(self.title,screenDoor)
|
||||
|
||||
|
||||
|
||||
|
@ -8,6 +8,7 @@ func _on_psl_click_signal() -> void:
|
||||
hideInterlockReleaseSwitchHandleKey()
|
||||
if !$"../stationKeys".pslKeyVisible() :
|
||||
hidePSLAllowHandleKey()
|
||||
$"..".allClickPlatformSignal.emit('PSL')
|
||||
|
||||
|
||||
func _on_close_requested():
|
||||
@ -16,7 +17,7 @@ func _on_close_requested():
|
||||
|
||||
##点击按钮或钥匙
|
||||
func onHandleSignal(openLight: bool, keySwitch: Variant) -> void:
|
||||
print(openLight,keySwitch,666)
|
||||
$"..".allClickPlatformSignal.emit(keySwitch.name,keySwitch)
|
||||
|
||||
##显影psl相关钥匙操作
|
||||
func shouPSLAllowHandleKey():
|
||||
|
@ -13,6 +13,7 @@ func _on_screen_door_click_signal(screenDoor:ScreenDoor,mousePosition) -> void:
|
||||
isolation_strip.text = '撤下隔离带'
|
||||
else :
|
||||
isolation_strip.text = '放置隔离带'
|
||||
$"..".allClickPlatformSignal.emit(screenDoor.name+'RightClick',screenDoor)
|
||||
|
||||
func _on_close_requested() -> void:
|
||||
hide()
|
||||
|
@ -18,14 +18,14 @@ var current_lcb_keyname: String=''
|
||||
|
||||
func _on_key_focus_entered(node):
|
||||
current_focus = node
|
||||
print("node : ", current_focus.name, " focus")
|
||||
$"..".allClickPlatformSignal.emit(current_focus.name)
|
||||
|
||||
|
||||
func _on_button_pressed():
|
||||
if current_focus == null or (current_together_window==WindowType.LCB and (!current_focus.name.contains('LCB') or current_lcb_keyname)) or (current_together_window==WindowType.PSL and (!current_focus.name.contains('PSL') and !current_focus.name.contains('HSJC') )) or (current_together_window==WindowType.JJTC and !current_focus.name.contains('JJTC')):
|
||||
print("请选择钥匙")
|
||||
else:
|
||||
print("使用钥匙:", current_focus.name)
|
||||
$"..".allClickPlatformSignal.emit('confirmUseKey',current_focus.name)
|
||||
if current_focus.name.contains('LCB') :
|
||||
$"../LCB".shouHandleKey(current_focus.name)
|
||||
$"../LCB".grab_focus()
|
||||
|
@ -44,3 +44,6 @@ func _ready() -> void:
|
||||
screenDoorInstance.name = 'screenDoor{0}'.format([i])
|
||||
screenDoorInstance.connect("clickLcbSignalAndSent",Callable($LCB,"_on_screen_door_click_lcb_signal"))
|
||||
screenDoorInstance.connect("clicksScreenDoorSignal",Callable($ScreenDoorOperate,"_on_screen_door_click_signal"))
|
||||
|
||||
##所有站台点击操作汇总
|
||||
signal allClickPlatformSignal(equipmentName:String,equipmentInfo)
|
||||
|
@ -60,3 +60,39 @@ func setAssignScreenDoorsFault (screenDoorNames:Array,faultType:ScreenDoor.Scree
|
||||
var screenDoorIndex=int(screenDoorName[screenDoorName.length() - 1])
|
||||
if screenDoorIndex in screenDoorNames:
|
||||
child.setScreenDoorFault(faultType)
|
||||
|
||||
|
||||
##所有交互操作汇总
|
||||
func _on_platform_all_click_platform_signal(equipmentName: String,equipmentInfo=null) -> void:
|
||||
print(equipmentName,equipmentInfo,6666)
|
||||
|
||||
|
||||
const allClickEquipmentInfo = {
|
||||
"LCB1": "hhh",
|
||||
"LCB2": "hhh",
|
||||
"LCB3": "hhh",
|
||||
"LCB4": "hhh",
|
||||
"PSL": "hhh",
|
||||
"JJTC": "hhh",
|
||||
"screenDoor1RightClick": "hhh",
|
||||
"screenDoor2RightClick": "hhh",
|
||||
"screenDoor3RightClick": "hhh",
|
||||
"screenDoor4RightClick": "hhh",
|
||||
"LCB_Key1": "hhh",
|
||||
"LCB_Key2": "hhh",
|
||||
"LCB_Key3": "hhh",
|
||||
"LCB_Key4": "hhh",
|
||||
"JJTC_Key": "hhh",
|
||||
"PSL_Key": "hhh",
|
||||
"HSJC_Key": "hhh",
|
||||
"SDJS_Key": "hhh",
|
||||
"confirmUseKey": "hhh",
|
||||
"PSLAllow": "hhh",
|
||||
"CloseDoorButton": "hhh",
|
||||
"OpenDoorButton": "hhh",
|
||||
"InterlockReleaseSwitch": "hhh",
|
||||
"LightTestButton": "hhh",
|
||||
"trainDepartsButton": "hhh",
|
||||
"interconnectedCloseButton": "hhh",
|
||||
"interconnectedOpenButton": "hhh",
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ script = ExtResource("1_s45rl")
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 20, 0, 0)
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.004, 1.768, 6.38)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.424, 1.768, 6.555)
|
||||
visible = false
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
@ -92,6 +92,7 @@ one_shot = true
|
||||
wait_time = 3.0
|
||||
one_shot = true
|
||||
|
||||
[connection signal="allClickPlatformSignal" from="platform" to="." method="_on_platform_all_click_platform_signal"]
|
||||
[connection signal="animation_finished" from="trainAnimationPlayer" to="train" method="_on_train_animation_player_animation_finished"]
|
||||
[connection signal="timeout" from="BeginTimer" to="." method="_on_beginTimer_timeout"]
|
||||
[connection signal="timeout" from="EndTimer" to="." method="_on_end_timer_timeout"]
|
||||
|
Loading…
Reference in New Issue
Block a user