Merge branch 'main' of https://gitea.joylink.club/joylink/godot-psd-training into main
This commit is contained in:
commit
a6159980e4
@ -110,7 +110,7 @@ func _on_platform_all_click_platform_signal(equipmentName: String,equipmentInfo=
|
|||||||
|
|
||||||
##所有交互操作平面坐标
|
##所有交互操作平面坐标
|
||||||
func allClickEquipmentPostion(equipmentName: String) -> Vector2:
|
func allClickEquipmentPostion(equipmentName: String) -> Vector2:
|
||||||
if equipmentName == 'LCB1' :
|
if equipmentName == 'LCB1' : ##LCB以及LCB面板
|
||||||
return getScreenPosition($platform.get_node('screenDoor1').get_node('LCB').get_node('LCB_body'))
|
return getScreenPosition($platform.get_node('screenDoor1').get_node('LCB').get_node('LCB_body'))
|
||||||
elif equipmentName == 'LCB2' :
|
elif equipmentName == 'LCB2' :
|
||||||
return getScreenPosition($platform.get_node('screenDoor2').get_node('LCB').get_node('LCB_body'))
|
return getScreenPosition($platform.get_node('screenDoor2').get_node('LCB').get_node('LCB_body'))
|
||||||
@ -118,11 +118,23 @@ func allClickEquipmentPostion(equipmentName: String) -> Vector2:
|
|||||||
return getScreenPosition($platform.get_node('screenDoor3').get_node('LCB').get_node('LCB_body'))
|
return getScreenPosition($platform.get_node('screenDoor3').get_node('LCB').get_node('LCB_body'))
|
||||||
elif equipmentName == 'LCB4' :
|
elif equipmentName == 'LCB4' :
|
||||||
return getScreenPosition($platform.get_node('screenDoor4').get_node('LCB').get_node('LCB_body'))
|
return getScreenPosition($platform.get_node('screenDoor4').get_node('LCB').get_node('LCB_body'))
|
||||||
elif equipmentName == 'PSL' :
|
elif equipmentName in ['LCB1LeftRotate','LCB2LeftRotate','LCB3LeftRotate','LCB4LeftRotate'] :
|
||||||
|
var lcbPos = $platform.get_node('LCB').position
|
||||||
|
var leftRotatePos = $platform.get_node('LCB').get_node('LCB2_Left_Rotate').get_global_position()
|
||||||
|
return Vector2(lcbPos.x+leftRotatePos.x,lcbPos.y+leftRotatePos.y)
|
||||||
|
elif equipmentName in ['LCB1RightRotate','LCB2RightRotate','LCB3RightRotate','LCB4RightRotate'] :
|
||||||
|
var lcbPos = $platform.get_node('LCB').position
|
||||||
|
var rightRotatePos = $platform.get_node('LCB').get_node('LCB2_Right_Rotate').get_global_position()
|
||||||
|
return Vector2(lcbPos.x+rightRotatePos.x,lcbPos.y+rightRotatePos.y)
|
||||||
|
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)
|
||||||
|
elif equipmentName == 'PSL' : ##PSL以及PSL面板
|
||||||
return getScreenPosition($platform.get_node('PSL').get_node('PSL_body'))
|
return getScreenPosition($platform.get_node('PSL').get_node('PSL_body'))
|
||||||
elif equipmentName == 'JJTC' :
|
elif equipmentName == 'JJTC' : ##JJTC以及JJTC面板
|
||||||
return getScreenPosition($platform.get_node('JJTC').get_node('JJTC_body'))
|
return getScreenPosition($platform.get_node('JJTC').get_node('JJTC_body'))
|
||||||
elif equipmentName == 'screenDoor1RightClick' :
|
elif equipmentName == 'screenDoor1RightClick' : ##屏蔽门右键以及屏蔽门右键面板
|
||||||
return getScreenPosition($platform.get_node('screenDoor1').get_node('left'))
|
return getScreenPosition($platform.get_node('screenDoor1').get_node('left'))
|
||||||
elif equipmentName == 'screenDoor2RightClick' :
|
elif equipmentName == 'screenDoor2RightClick' :
|
||||||
return getScreenPosition($platform.get_node('screenDoor2').get_node('left'))
|
return getScreenPosition($platform.get_node('screenDoor2').get_node('left'))
|
||||||
|
Loading…
Reference in New Issue
Block a user