From bf066602feb73373c3d315385f16c2fed792d849 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Thu, 16 May 2024 15:25:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=92=A5=E5=8C=99=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BD=8D=E7=BD=AEbug=E4=BF=AE=E5=A4=8D=EF=BC=8C=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=85=88=E6=98=BE=E7=A4=BA=E9=9D=A2=E6=9D=BF=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E5=B8=83=E5=B1=80=E6=89=8D=E8=83=BD=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=9B=B8=E5=BA=94=E8=8A=82=E7=82=B9=E7=9A=84=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sceen/total.gd | 26 +++++++++++++++++++------- sceen/total.tscn | 4 ++++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/sceen/total.gd b/sceen/total.gd index 124276b..9eab467 100644 --- a/sceen/total.gd +++ b/sceen/total.gd @@ -95,18 +95,12 @@ func checkCurrentClick() -> bool: return true else : return false - func _on_platform_all_click_platform_signal(equipmentName: String,equipmentInfo=null) -> void: - print(equipmentName,equipmentInfo,6666) currentClickNode = equipmentName var isClickCorrect = checkCurrentClick() currentClickCheckSignal.emit(isClickCorrect) equipmentInfo.allowHandle = isClickCorrect - if isClickCorrect: - print('操作正确') - else : - print('操作错误') const NodeUtils = preload("res://util/NodeUtils.gd") @@ -119,7 +113,7 @@ func allClickEquipmentPostion(equipmentName: String) -> Vector2: var confirmUseKeyPos=NodeUtils.find_child_by_name(keysWindow,'Button').get_global_position() return Vector2(lcbWindowPos.x+confirmUseKeyPos.x,lcbWindowPos.y+confirmUseKeyPos.y) var LCB_KeyPos=NodeUtils.find_child_by_name(keysWindow,equipmentName).get_global_position() - return Vector2(lcbWindowPos.x+LCB_KeyPos.x,lcbWindowPos.y+LCB_KeyPos.y) + return Vector2(lcbWindowPos.x+LCB_KeyPos.x+70,lcbWindowPos.y+LCB_KeyPos.y+20) elif equipmentName == 'LCB1' : ##LCB以及LCB面板 return getScreenPosition($platform.get_node('screenDoor1').get_node('LCB').get_node('LCB_body')) elif equipmentName == 'LCB2' : @@ -256,3 +250,21 @@ const allClickEquipmentInfo = { "clickAdhesiveTapeOfscreenDoor4": "请选择粘贴胶带", "clickIsolationStripOfscreenDoor4": "请选择放置隔离带", } + +func _ready(): + var stationKeys = $platform.get_node('stationKeys') + var psl = $platform.get_node('psl') + stationKeys.visible = true + stationKeys.position = Vector2(2100,1100) + psl.visible = true + psl.position = Vector2(2100,1100) + $openAllwindow.start() + + +func _on_open_allwindow_timeout() -> void: + var stationKeys = $platform.get_node('stationKeys') + var psl = $platform.get_node('psl') + stationKeys.visible = false + stationKeys.position = Vector2(1133,325) + psl.visible = false + psl.position = Vector2(568,190) diff --git a/sceen/total.tscn b/sceen/total.tscn index 18cef48..4a4120a 100644 --- a/sceen/total.tscn +++ b/sceen/total.tscn @@ -93,7 +93,11 @@ one_shot = true wait_time = 3.0 one_shot = true +[node name="openAllwindow" type="Timer" parent="."] +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"] +[connection signal="timeout" from="openAllwindow" to="." method="_on_open_allwindow_timeout"] From fe275aafc25b3dfb8efd21c4ded43d620c40c304 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Thu, 16 May 2024 15:47:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=BE=AE=E8=B0=83=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sceen/total.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sceen/total.gd b/sceen/total.gd index 9eab467..e9a253c 100644 --- a/sceen/total.gd +++ b/sceen/total.gd @@ -111,7 +111,7 @@ func allClickEquipmentPostion(equipmentName: String) -> Vector2: var lcbWindowPos = keysWindow.position if equipmentName == 'confirmUseKey': var confirmUseKeyPos=NodeUtils.find_child_by_name(keysWindow,'Button').get_global_position() - return Vector2(lcbWindowPos.x+confirmUseKeyPos.x,lcbWindowPos.y+confirmUseKeyPos.y) + return Vector2(lcbWindowPos.x+confirmUseKeyPos.x+30,lcbWindowPos.y+confirmUseKeyPos.y) var LCB_KeyPos=NodeUtils.find_child_by_name(keysWindow,equipmentName).get_global_position() return Vector2(lcbWindowPos.x+LCB_KeyPos.x+70,lcbWindowPos.y+LCB_KeyPos.y+20) elif equipmentName == 'LCB1' : ##LCB以及LCB面板 @@ -133,7 +133,7 @@ func allClickEquipmentPostion(equipmentName: String) -> Vector2: elif equipmentName in ['removeKeyOfWindowLCB1','removeKeyOfWindowLCB2','removeKeyOfWindowLCB3','removeKeyOfWindowLCB4'] : var lcbPos = $platform.get_node('LCB').position var removePos = $platform.get_node('LCB').get_node('TextureRect2').get_global_position() - return Vector2(lcbPos.x+removePos.x,lcbPos.y+removePos.y) + return Vector2(lcbPos.x+removePos.x-25,lcbPos.y+removePos.y-5) elif equipmentName == 'PSL' : ##PSL以及PSL面板 return getScreenPosition($platform.get_node('PSL').get_node('PSL_body')) elif equipmentName in ['PSLAllow','CloseDoorButton','OpenDoorButton','InterlockReleaseSwitch','LightTestButton','trainDepartsButton','interconnectedCloseButton','interconnectedOpenButton','removePSLKeyOfWindowPsl','removeHSJCKeyOfWindowPsl'] :