2024-07-05 18:22:52 +08:00
|
|
|
extends Node3D
|
|
|
|
|
2024-07-09 17:27:43 +08:00
|
|
|
class_name ShortcutToolModel2
|
2024-07-05 18:22:52 +08:00
|
|
|
|
|
|
|
##是否允许操作
|
|
|
|
var allowHandle :bool = true
|
|
|
|
|
|
|
|
##所有ShortTool点击操作汇总
|
|
|
|
signal AllClickShortcutToolModel2(equipmentName:String, equipmentInfo: Variant)
|
|
|
|
|
|
|
|
|
|
|
|
func _on_mouse_entered() -> void:
|
|
|
|
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_POINTING_HAND)
|
|
|
|
|
|
|
|
|
|
|
|
func _on_mouse_exited() -> void:
|
|
|
|
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_ARROW)
|
|
|
|
|
|
|
|
|
|
|
|
func _on_hoarding_at_escalator_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
|
|
|
AllClickShortcutToolModel2.emit('hoardingAtEscalatorUp',self)
|
|
|
|
if !allowHandle :
|
|
|
|
return
|
|
|
|
$hoardingAtEscalatorUp.visible = false
|
|
|
|
|
|
|
|
|
|
|
|
func _on_hoarding_at_escalator_down_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
|
|
|
AllClickShortcutToolModel2.emit('hoardingAtEscalatorDown',self)
|
|
|
|
if !allowHandle :
|
|
|
|
return
|
|
|
|
$hoardingAtEscalatorDown.visible = false
|
|
|
|
|
|
|
|
|
|
|
|
func _on_picketline_model_at_b_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
|
|
|
AllClickShortcutToolModel2.emit('picketlineModelAtB',self)
|
|
|
|
if !allowHandle :
|
|
|
|
return
|
|
|
|
$picketlineModelAtB.visible = false
|
|
|
|
|
|
|
|
|
|
|
|
func _on_picketline_model_at_a_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
|
|
|
AllClickShortcutToolModel2.emit('picketlineModelAtA',self)
|
|
|
|
if !allowHandle :
|
|
|
|
return
|
|
|
|
$picketlineModelAtA.visible = false
|
|
|
|
|
|
|
|
|
|
|
|
func _on_picketline_model_at_gate_b_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
|
|
|
AllClickShortcutToolModel2.emit('picketlineModelAtGateB',self)
|
|
|
|
if !allowHandle :
|
|
|
|
return
|
|
|
|
$picketlineModelAtGateB.visible = false
|
|
|
|
|
|
|
|
|
|
|
|
func _on_picketline_model_at_gate_a_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
|
|
|
AllClickShortcutToolModel2.emit('picketlineModelAtGateA',self)
|
|
|
|
if !allowHandle :
|
|
|
|
return
|
|
|
|
$picketlineModelAtGateA.visible = false
|
|
|
|
|
|
|
|
|
|
|
|
func _on_notice_signs_model_at_a_entrance_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
|
|
|
AllClickShortcutToolModel2.emit('noticeSignsModelAtAEntrance',self)
|
|
|
|
if !allowHandle :
|
|
|
|
return
|
|
|
|
$noticeSignsModelAtAEntrance.visible = false
|
|
|
|
|
|
|
|
|
|
|
|
func _on_notice_signs_model_at_b_entrance_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
|
|
|
AllClickShortcutToolModel2.emit('noticeSignsModelAtBEntrance',self)
|
|
|
|
if !allowHandle :
|
|
|
|
return
|
|
|
|
$noticeSignsModelAtBEntrance.visible = false
|
|
|
|
|
|
|
|
|
|
|
|
func _on_notice_signs_model_at_c_entrance_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
|
|
|
AllClickShortcutToolModel2.emit('noticeSignsModelAtCEntrance',self)
|
|
|
|
if !allowHandle :
|
|
|
|
return
|
|
|
|
$noticeSignsModelAtCEntrance.visible = false
|
|
|
|
|
|
|
|
|
|
|
|
func _on_notice_signs_model_at_d_entrance_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
|
|
|
AllClickShortcutToolModel2.emit('noticeSignsModelAtDEntrance',self)
|
|
|
|
if !allowHandle :
|
|
|
|
return
|
|
|
|
$noticeSignsModelAtDEntrance.visible = false
|
|
|
|
|
|
|
|
|
|
|
|
func _on_metal_barrier_model_at_d_entrance_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
|
|
|
AllClickShortcutToolModel2.emit('metalBarrierModelAtDEntrance',self)
|
|
|
|
if !allowHandle :
|
|
|
|
return
|
|
|
|
$metalBarrierModelAtDEntrance.visible = false
|
|
|
|
|
|
|
|
|
2024-07-09 17:27:43 +08:00
|
|
|
func _on_metal_barrier_model_at_station_hall_d_exit_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
2024-07-05 18:22:52 +08:00
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
2024-07-09 17:27:43 +08:00
|
|
|
AllClickShortcutToolModel2.emit('metalBarrierModelAtStationHallDExit',self)
|
2024-07-05 18:22:52 +08:00
|
|
|
if !allowHandle :
|
|
|
|
return
|
2024-07-09 17:27:43 +08:00
|
|
|
$metalBarrierModelAtStationHallDExit.visible = false
|
2024-07-05 18:22:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
func _on_metal_barrier_model_at_c_entrance_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
|
|
|
AllClickShortcutToolModel2.emit('metalBarrierModelAtCEntrance',self)
|
|
|
|
if !allowHandle :
|
|
|
|
return
|
|
|
|
$metalBarrierModelAtCEntrance.visible = false
|
|
|
|
|
|
|
|
|
|
|
|
func _on_metal_barrier_model_at_c_passage_area_3d_input_event(camera: Node, event: InputEvent, position: Vector3, normal: Vector3, shape_idx: int) -> void:
|
|
|
|
if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
|
2024-07-09 17:27:43 +08:00
|
|
|
AllClickShortcutToolModel2.emit('metalBarrierModelAtStationHallCExit',self)
|
2024-07-05 18:22:52 +08:00
|
|
|
if !allowHandle :
|
|
|
|
return
|
2024-07-09 17:27:43 +08:00
|
|
|
$metalBarrierModelAtStationHallCExit.visible = false
|