Merge branch 'main' of https://gitea.joylink.club/joylink/godot-psd-training into main
This commit is contained in:
commit
4bba627c6e
@ -26,6 +26,7 @@ func _input(event):
|
||||
var flag2 = test_enter()
|
||||
if flag2 and event.button_index == MOUSE_BUTTON_LEFT:
|
||||
# 处理点击事件
|
||||
$"..".allClickJJTCSignal.emit('JJTCLeftRotate')
|
||||
$"../JJTC_Right_Rotate".hide()
|
||||
self.hide()
|
||||
$"../JJTC_Key".hide()
|
||||
|
@ -27,7 +27,7 @@ func _input(event):
|
||||
if flag2 and event.button_index == MOUSE_BUTTON_LEFT:
|
||||
# 处理点击事件
|
||||
#self.modulate = Color(0, 1, 1, 1);$".."
|
||||
print("Sprite2D clicked!")
|
||||
$"..".allClickJJTCSignal.emit('JJTCRightRotate')
|
||||
$"../PanelContainer/VBoxContainer/MarginContainer/JJTC_Box".jjtc_state = $"../PanelContainer/VBoxContainer/MarginContainer/JJTC_Box".JJTC_STATE.OPEN
|
||||
$"../JJTC_Box_Voice".play()
|
||||
$"../JJTC_Key".hide()
|
||||
|
@ -23,7 +23,7 @@ func shouJJTCKey():
|
||||
|
||||
func _on_jjtc_button_gui_input(event):
|
||||
if event.button_mask == MouseButtonMask.MOUSE_BUTTON_MASK_LEFT:
|
||||
print('jjtc button 按下')
|
||||
allClickJJTCSignal.emit('JJTCButton')
|
||||
|
||||
|
||||
func _on_jjtc_button_mouse_entered():
|
||||
@ -35,3 +35,6 @@ func _on_jjtc_button_mouse_exited():
|
||||
|
||||
func pullOutKey():
|
||||
$"../stationKeys".showKeyAfterRemoveKey('JJTC_Key')
|
||||
|
||||
##所有LCB点击操作汇总
|
||||
signal allClickJJTCSignal(equipmentName:String,equipmentInfo)
|
||||
|
@ -27,7 +27,6 @@ func _input(event):
|
||||
if flag2 and event.button_index == MOUSE_BUTTON_LEFT:
|
||||
# 处理点击事件
|
||||
#self.modulate = Color(0, 1, 1, 1);$".."
|
||||
print("Sprite2D clicked!")
|
||||
if $"..".knob_state == $"..".KNOB_STATE.AUTO:
|
||||
$"../LCBRotateAnimation".play("AutoToIsolate", -1, 10)
|
||||
$"..".change_knob_state($"..".KNOB_STATE.ISOLATE)
|
||||
@ -37,3 +36,4 @@ func _input(event):
|
||||
elif $"..".knob_state == $"..".KNOB_STATE.OPEN:
|
||||
$"../LCBRotateAnimation".play("OpenToClose", -1, 10)
|
||||
$"..".change_knob_state($"..".KNOB_STATE.CLOSE)
|
||||
$"..".allClickLCBSignal.emit($"..".title+"LeftRotate", $"..".knob_state)
|
||||
|
@ -27,7 +27,6 @@ func _input(event):
|
||||
if flag2 and event.button_index == MOUSE_BUTTON_LEFT:
|
||||
# 处理点击事件
|
||||
#self.modulate = Color(0, 1, 1, 1);$".."
|
||||
print("Sprite2D clicked!")
|
||||
if $"..".knob_state == $"..".KNOB_STATE.AUTO:
|
||||
$"../LCBRotateAnimation".play("AutoToClose", -1, 10)
|
||||
$"..".change_knob_state($"..".KNOB_STATE.CLOSE)
|
||||
@ -37,3 +36,4 @@ func _input(event):
|
||||
elif $"..".knob_state == $"..".KNOB_STATE.CLOSE:
|
||||
$"../LCBRotateAnimation".play("CloseToOpen", -1, 10)
|
||||
$"..".change_knob_state($"..".KNOB_STATE.OPEN)
|
||||
$"..".allClickLCBSignal.emit($"..".title+"RightRotate", $"..".knob_state)
|
||||
|
@ -90,6 +90,7 @@ func _on_texture_rect_2_gui_input(event: InputEvent) -> void:
|
||||
hideHandleKey()
|
||||
$"../stationKeys".showKeyAfterRemoveKey(currenScreenDoor.lcbKey.keyName)
|
||||
currenScreenDoor.lcbKey.keyName = ''
|
||||
allClickLCBSignal.emit('removeKeyOfWindow'+self.title)
|
||||
|
||||
|
||||
func _on_texture_rect_2_mouse_entered() -> void:
|
||||
@ -98,3 +99,7 @@ func _on_texture_rect_2_mouse_entered() -> void:
|
||||
|
||||
func _on_texture_rect_2_mouse_exited() -> void:
|
||||
$TextureRect2.set_default_cursor_shape(Control.CursorShape.CURSOR_ARROW)
|
||||
|
||||
|
||||
##所有LCB点击操作汇总
|
||||
signal allClickLCBSignal(equipmentName:String,equipmentInfo)
|
||||
|
@ -39,8 +39,10 @@ func remove_key(keyName: Variant) -> void:
|
||||
var name = ''
|
||||
if keyName == 'PSLAllow' :
|
||||
name = 'PSL_Key'
|
||||
allClickPslSignal.emit('removePSLKeyOfWindowPsl')
|
||||
elif keyName == 'InterlockReleaseSwitch' :
|
||||
name = 'HSJC_Key'
|
||||
allClickPslSignal.emit('removeHSJCKeyOfWindowPsl')
|
||||
$"../stationKeys".showKeyAfterRemoveKey(name)
|
||||
|
||||
|
||||
@ -68,3 +70,7 @@ func _process(delta: float) -> void:
|
||||
else:
|
||||
$MarginContainer/GridContainer/VBoxContainer/ScreenDoorOpenLight.closeLight()
|
||||
|
||||
|
||||
##所有psl点击操作汇总
|
||||
signal allClickPslSignal(equipmentName:String,equipmentInfo)
|
||||
|
||||
|
@ -22,6 +22,7 @@ func _on_close_requested() -> void:
|
||||
func _on_adhesive_tape_button_down() -> void:
|
||||
currenScreenDoor.adhesiveTape()
|
||||
hide()
|
||||
allClickScreenDoorSignal.emit('clickAdhesiveTapeOf'+currenScreenDoor.name)
|
||||
|
||||
func _on_adhesive_tape_mouse_entered() -> void:
|
||||
$PanelContainer/MarginContainer/VBoxContainer/MarginContainer/AdhesiveTape/AdhesiveTape.set_default_cursor_shape(Control.CursorShape.CURSOR_POINTING_HAND)
|
||||
@ -34,6 +35,7 @@ func _on_adhesive_tape_mouse_exited() -> void:
|
||||
func _on_isolation_strip_button_down() -> void:
|
||||
currenScreenDoor.isSetIsolationStrip = !currenScreenDoor.isSetIsolationStrip
|
||||
hide()
|
||||
allClickScreenDoorSignal.emit('clickIsolationStripOf'+currenScreenDoor.name)
|
||||
|
||||
|
||||
func _on_isolation_strip_mouse_entered() -> void:
|
||||
@ -43,3 +45,6 @@ func _on_isolation_strip_mouse_entered() -> void:
|
||||
func _on_isolation_strip_mouse_exited() -> void:
|
||||
isolation_strip.set_default_cursor_shape(Control.CursorShape.CURSOR_ARROW)
|
||||
|
||||
##所有ScreenDoorOperate点击操作汇总
|
||||
signal allClickScreenDoorSignal(equipmentName:String,equipmentInfo)
|
||||
|
||||
|
@ -53,6 +53,7 @@ func _on_close_click_area_gui_input(event):
|
||||
$"../../../../JJTC_Left_Rotate".show()
|
||||
$"../../../../Close_Click_Area".hide()
|
||||
$"../../../../JJTC_Button".hide()
|
||||
$"../../../..".allClickJJTCSignal.emit('JJTCCloseBox')
|
||||
|
||||
|
||||
func _on_station_keys_mouse_entered():
|
||||
|
@ -47,3 +47,19 @@ func _ready() -> void:
|
||||
|
||||
##所有站台点击操作汇总
|
||||
signal allClickPlatformSignal(equipmentName:String,equipmentInfo)
|
||||
|
||||
|
||||
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)
|
||||
|
@ -41,6 +41,10 @@ visible = false
|
||||
|
||||
[connection signal="clickLPslSignal" from="PSL" to="psl" method="_on_psl_click_signal"]
|
||||
[connection signal="clickJJTCSignal" from="JJTC" to="jjtc" method="_on_jjtc_click_jjtc_signal"]
|
||||
[connection signal="allClickLCBSignal" from="LCB" to="." method="_on_lcb_all_click_lcb_signal"]
|
||||
[connection signal="close_requested" from="LCB" to="LCB" method="_on_close_requested"]
|
||||
[connection signal="allClickPslSignal" from="psl" to="." method="_on_psl_all_click_psl_signal"]
|
||||
[connection signal="allClickJJTCSignal" from="jjtc" to="." method="_on_jjtc_all_click_jjtc_signal"]
|
||||
[connection signal="close_requested" from="jjtc" to="jjtc" method="_on_close_requested"]
|
||||
[connection signal="allClickScreenDoorSignal" from="ScreenDoorOperate" to="." method="_on_screen_door_operate_all_click_screen_door_signal"]
|
||||
[connection signal="close_requested" from="ScreenDoorOperate" to="ScreenDoorOperate" method="_on_close_requested"]
|
||||
|
@ -63,22 +63,14 @@ func setAssignScreenDoorsFault (screenDoorNames:Array,faultType:ScreenDoor.Scree
|
||||
|
||||
|
||||
##所有交互操作汇总
|
||||
var cureentClickNode = null
|
||||
func _on_platform_all_click_platform_signal(equipmentName: String,equipmentInfo=null) -> void:
|
||||
print(equipmentName,equipmentInfo,6666)
|
||||
cureentClickNode = equipmentName
|
||||
|
||||
|
||||
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_Key1": "hhh", ##钥匙面板
|
||||
"LCB_Key2": "hhh",
|
||||
"LCB_Key3": "hhh",
|
||||
"LCB_Key4": "hhh",
|
||||
@ -87,6 +79,23 @@ const allClickEquipmentInfo = {
|
||||
"HSJC_Key": "hhh",
|
||||
"SDJS_Key": "hhh",
|
||||
"confirmUseKey": "hhh",
|
||||
"LCB1": "hhh", ##LCB以及LCB面板
|
||||
"LCB2": "hhh",
|
||||
"LCB3": "hhh",
|
||||
"LCB4": "hhh",
|
||||
"LCB1LeftRotate": "hhh",
|
||||
"LCB1RightRotate": "hhh",
|
||||
"LCB2LeftRotate": "hhh",
|
||||
"LCB2RightRotate": "hhh",
|
||||
"LCB3LeftRotate": "hhh",
|
||||
"LCB3RightRotate": "hhh",
|
||||
"LCB4LeftRotate": "hhh",
|
||||
"LCB4RightRotate": "hhh",
|
||||
"removeKeyOfWindowLCB1": "hhh",
|
||||
"removeKeyOfWindowLCB2": "hhh",
|
||||
"removeKeyOfWindowLCB3": "hhh",
|
||||
"removeKeyOfWindowLCB4": "hhh",
|
||||
"PSL": "hhh", ##PSL以及PSL面板
|
||||
"PSLAllow": "hhh",
|
||||
"CloseDoorButton": "hhh",
|
||||
"OpenDoorButton": "hhh",
|
||||
@ -95,4 +104,23 @@ const allClickEquipmentInfo = {
|
||||
"trainDepartsButton": "hhh",
|
||||
"interconnectedCloseButton": "hhh",
|
||||
"interconnectedOpenButton": "hhh",
|
||||
"removePSLKeyOfWindowPsl": "hhh",
|
||||
"removeHSJCKeyOfWindowPsl": "hhh",
|
||||
"JJTC": "hhh", ##JJTC以及JJTC面板
|
||||
"JJTCLeftRotate": "hhh",
|
||||
"JJTCRightRotate": "hhh",
|
||||
"JJTCButton": "hhh",
|
||||
"JJTCCloseBox": "hhh",
|
||||
"screenDoor1RightClick": "hhh", ##屏蔽门右键以及屏蔽门右键面板
|
||||
"screenDoor2RightClick": "hhh",
|
||||
"screenDoor3RightClick": "hhh",
|
||||
"screenDoor4RightClick": "hhh",
|
||||
"clickAdhesiveTapeOfscreenDoor1": "hhh",
|
||||
"clickIsolationStripOfscreenDoor1": "hhh",
|
||||
"clickAdhesiveTapeOfscreenDoor2": "hhh",
|
||||
"clickIsolationStripOfscreenDoor2": "hhh",
|
||||
"clickAdhesiveTapeOfscreenDoor3": "hhh",
|
||||
"clickIsolationStripOfscreenDoor3": "hhh",
|
||||
"clickAdhesiveTapeOfscreenDoor4": "hhh",
|
||||
"clickIsolationStripOfscreenDoor4": "hhh",
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user