total增加摄像机和快捷工具的提示信息

This commit is contained in:
joylink_zhaoerwei 2024-06-21 16:30:29 +08:00
parent 3dc03af882
commit 8512a0368c
37 changed files with 467 additions and 35 deletions

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://h6off16vqcfg"
path="res://.godot/imported/abkzcbjcdksztmjhjzkj.mp3-d696adf522b9c9a590a892a13c12b1e2.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/abkzcbjcdksztmjhjzkj.mp3"
dest_files=["res://.godot/imported/abkzcbjcdksztmjhjzkj.mp3-d696adf522b9c9a590a892a13c12b1e2.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://dlxpjratb85q1"
path="res://.godot/imported/czhfzcyyzzckzcjcz.mp3-cadcec5c0c358b3c8ebadd9ed3c5cb32.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/czhfzcyyzzckzcjcz.mp3"
dest_files=["res://.godot/imported/czhfzcyyzzckzcjcz.mp3-cadcec5c0c358b3c8ebadd9ed3c5cb32.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://kjy8alwyj2fl"
path="res://.godot/imported/czqdyjklkzftgwsx.mp3-46a8b0bfe24bd68cf158b412e2843419.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/czqdyjklkzftgwsx.mp3"
dest_files=["res://.godot/imported/czqdyjklkzftgwsx.mp3-46a8b0bfe24bd68cf158b412e2843419.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://dj1vvsxhixuv6"
path="res://.godot/imported/fjtygjbsghdgjs.mp3-79a987ee313a552ff440cb8106f3e98a.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/fjtygjbsghdgjs.mp3"
dest_files=["res://.godot/imported/fjtygjbsghdgjs.mp3-79a987ee313a552ff440cb8106f3e98a.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://dpcnv5e5bwnqe"
path="res://.godot/imported/gwckqzyklldyxjzxxhz.mp3-705335b062a8932ad5a18d73d801d5c4.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/gwckqzyklldyxjzxxhz.mp3"
dest_files=["res://.godot/imported/gwckqzyklldyxjzxxhz.mp3-705335b062a8932ad5a18d73d801d5c4.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://036tsoo1ml1d"
path="res://.godot/imported/gwzjdckbtztggxndljyhz.mp3-4bfef05a471bd31dd7ea087b34a46b64.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/gwzjdckbtztggxndljyhz.mp3"
dest_files=["res://.godot/imported/gwzjdckbtztggxndljyhz.mp3-4bfef05a471bd31dd7ea087b34a46b64.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bljmtth72h4i2"
path="res://.godot/imported/gwzjtcktyzxzbtzgxndljyhz.mp3-c9fb4a7575517a4cea688c6ab0e713e0.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/gwzjtcktyzxzbtzgxndljyhz.mp3"
dest_files=["res://.godot/imported/gwzjtcktyzxzbtzgxndljyhz.mp3-c9fb4a7575517a4cea688c6ab0e713e0.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://d10aph61ehc1o"
path="res://.godot/imported/sdjxzhztckfwgz.mp3-ef452cbbf7eacf3d4fae21bd33f4d4a8.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/sdjxzhztckfwgz.mp3"
dest_files=["res://.godot/imported/sdjxzhztckfwgz.mp3-ef452cbbf7eacf3d4fae21bd33f4d4a8.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://68j6u6654wx3"
path="res://.godot/imported/sdyanbajlsspttztvm.mp3-b573eb1c0cf6426bdb60d8bc03293b2b.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/sdyanbajlsspttztvm.mp3"
dest_files=["res://.godot/imported/sdyanbajlsspttztvm.mp3-b573eb1c0cf6426bdb60d8bc03293b2b.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://uyhcmsqklctw"
path="res://.godot/imported/sdzhckjzydgz.mp3-7205aa1ddf5cb1b88f972fe4d58561f1.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/sdzhckjzydgz.mp3"
dest_files=["res://.godot/imported/sdzhckjzydgz.mp3-7205aa1ddf5cb1b88f972fe4d58561f1.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bg44300inkpy2"
path="res://.godot/imported/sdzhztckfwgz.mp3-7bbad698ef54d24c018a955933111b43.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/sdzhztckfwgz.mp3"
dest_files=["res://.godot/imported/sdzhztckfwgz.mp3-7bbad698ef54d24c018a955933111b43.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://04w44dhwa1df"
path="res://.godot/imported/xcrkjzcbjzzckjz.mp3-df5bb39216824e04eb2a45e345f4285f.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/xcrkjzcbjzzckjz.mp3"
dest_files=["res://.godot/imported/xcrkjzcbjzzckjz.mp3-df5bb39216824e04eb2a45e345f4285f.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://cauo5pq83ewmw"
path="res://.godot/imported/ybzkdjdzcqtgzjqlj.mp3-5e8af0a682b80592615d8eb4b440c5ec.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/ybzkdjdzcqtgzjqlj.mp3"
dest_files=["res://.godot/imported/ybzkdjdzcqtgzjqlj.mp3-5e8af0a682b80592615d8eb4b440c5ec.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://2jglnogvksud"
path="res://.godot/imported/zzjzjcszjjjfpfxckjz.mp3-7063c9058754ba2f4469fe63a5cae248.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/zzjzjcszjjjfpfxckjz.mp3"
dest_files=["res://.godot/imported/zzjzjcszjjjfpfxckjz.mp3-7063c9058754ba2f4469fe63a5cae248.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bthx8oconhghg"
path="res://.godot/imported/zztffqszjjxlsspttzsp.mp3-2b6371f3f162c802b21f9b8e24d5724e.mp3str"
[deps]
source_file="res://Assets/training_speech/trainingLargePassengerFlow/zztffqszjjxlsspttzsp.mp3"
dest_files=["res://.godot/imported/zztffqszjjxlsspttzsp.mp3-2b6371f3f162c802b21f9b8e24d5724e.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -1,16 +1,16 @@
extends Node2D
##是否允许操作
var allowHandle :bool = true
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
##所有ShortTool点击操作汇总
signal AllClickCameraSwitchUi(equipmentName:String,equipmentInfo)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func switchCamera(camera):
func switchCamera(camera,emit=true):
if emit :
AllClickCameraSwitchUi.emit($"..".camera_map[camera],self)
if !allowHandle :
return
$"..".switchCamera(camera)
func uiChange(ui):
@ -44,6 +44,9 @@ func uiChange(ui):
$StationHallB.initButton()
func back():
AllClickCameraSwitchUi.emit('Back',self)
if !allowHandle :
return
$CameraSwitch.show()
$aPassageway.hide()
$bPassageway.hide()

View File

@ -1,19 +1,14 @@
extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func switchCamera(camera):
$"..".switchCamera(camera)
func switchCamera(camera,emit = true):
$"..".switchCamera(camera,emit)
func _on_vehicle_control_room_pressed():
switchCamera(LargePassengerFlowScene.Camera_name.SparePartsCabinet)
$"..".AllClickCameraSwitchUi.emit('VehicleControlRoom',$"..")
if !$"..".allowHandle :
return
switchCamera(LargePassengerFlowScene.Camera_name.SparePartsCabinet,false)
$"..".uiChange('VehicleControlRoom')
@ -29,29 +24,47 @@ func _on_down_platform_pressed():
func _on_a_passageway_pressed():
switchCamera(LargePassengerFlowScene.Camera_name.AEntrance)
$"..".AllClickCameraSwitchUi.emit('aPassageway',$"..")
if !$"..".allowHandle :
return
switchCamera(LargePassengerFlowScene.Camera_name.AEntrance,false)
$"..".uiChange('APassageway')
func _on_b_passageway_pressed():
switchCamera(LargePassengerFlowScene.Camera_name.BEntrance)
$"..".AllClickCameraSwitchUi.emit('bPassageway',$"..")
if !$"..".allowHandle :
return
switchCamera(LargePassengerFlowScene.Camera_name.BEntrance,false)
$"..".uiChange('BPassageway')
func _on_c_passageway_pressed():
switchCamera(LargePassengerFlowScene.Camera_name.CEntrance)
$"..".AllClickCameraSwitchUi.emit('CPassageway',$"..")
if !$"..".allowHandle :
return
switchCamera(LargePassengerFlowScene.Camera_name.CEntrance,false)
$"..".uiChange('CPassageway')
func _on_d_passageway_pressed():
switchCamera(LargePassengerFlowScene.Camera_name.DEntrance)
$"..".AllClickCameraSwitchUi.emit('DPassageway',$"..")
if !$"..".allowHandle :
return
switchCamera(LargePassengerFlowScene.Camera_name.DEntrance,false)
$"..".uiChange('DPassageway')
func _on_staion_hall_a_pressed():
switchCamera(LargePassengerFlowScene.Camera_name.AExitGate)
$"..".AllClickCameraSwitchUi.emit('StaionHallA',$"..")
if !$"..".allowHandle :
return
switchCamera(LargePassengerFlowScene.Camera_name.AExitGate,false)
$"..".uiChange('StaionHallA')
func _on_station_hall_b_pressed():
switchCamera(LargePassengerFlowScene.Camera_name.BExitGate)
$"..".AllClickCameraSwitchUi.emit('StaionHallB',$"..")
if !$"..".allowHandle :
return
switchCamera(LargePassengerFlowScene.Camera_name.BExitGate,false)
$"..".uiChange('StaionHallB')

View File

@ -70,7 +70,58 @@ func _on_screen_door_operate_all_click_screen_door_signal(equipmentName: String,
func _on_station_keys_all_click_station_keys_signal(equipmentName: String) -> void:
allClickPlatformSignal.emit(equipmentName,$stationKeys)
func _on_camera_switch_ui_all_click_camera_switch_ui(equipmentName: String, equipmentInfo: Variant) -> void:
allClickPlatformSignal.emit(equipmentName,equipmentInfo)
func _on_shortcut_tool_all_click_shortcut_tool(equipmentName: String, equipmentInfo: Variant) -> void:
allClickPlatformSignal.emit(equipmentName,equipmentInfo)
##屏蔽门lcb的状态变化
signal allScreenDoorLcbStateSignal(currenScreenDoor:ScreenDoor,knob_state:LcbWindow.KNOB_STATE)
func _on_lcb_lcb_knob_state_signal(currenScreenDoor: ScreenDoor, knob_state: LcbWindow.KNOB_STATE) -> void:
allScreenDoorLcbStateSignal.emit(currenScreenDoor,knob_state)
##展示相机切换和快捷工具
func showCameraAndShortcutTool() -> void:
$CameraSwitchUi.visible = true
$ShortcutTool.visible = true
##切换相机
func switchCamera (camera :LargePassengerFlowScene.Camera_name)-> void:
$"..".switchCamera(camera)
var Camera_name = LargePassengerFlowScene.Camera_name
var camera_map = {
Camera_name.SparePartsCabinet: "SparePartsCabinet",
Camera_name.PartsArea: "PartsArea",
Camera_name.StationHall: "StationHall",
Camera_name.UpPlatform: "UpPlatform",
Camera_name.DownPlatform: "DownPlatform",
Camera_name.StationHallAExit: "StationHallAExit",
Camera_name.AEntrance: "AEntrance",
Camera_name.APassage: "APassage",
Camera_name.StationHallBExit: "StationHallBExit",
Camera_name.BEntrance: "BEntrance",
Camera_name.BPassage: "BPassage",
Camera_name.StationHallCExit: "StationHallCExit",
Camera_name.CEntrance: "CEntrance",
Camera_name.CPassage: "CPassage",
Camera_name.StationHallDExit: "StationHallDExit",
Camera_name.DEntrance: "DEntrance",
Camera_name.DPassage: "DPassage",
Camera_name.ALowerStepSwitch: "ALowerStepSwitch",
Camera_name.ATVM: "ATVM",
Camera_name.AInboundGate: "AInboundGate",
Camera_name.AExitGate: "AExitGate",
Camera_name.AUpperStep: "AUpperStep",
Camera_name.ALowerStep: "ALowerStep",
Camera_name.AGangway: "AGangway",
Camera_name.BLowerStepSwitch: "BLowerStepSwitch",
Camera_name.BTVM: "BTVM",
Camera_name.BInboundGate: "BInboundGate",
Camera_name.BExitGate: "BExitGate",
Camera_name.BUpperStep: "BUpperStep",
Camera_name.BLowerStep: "BLowerStep",
Camera_name.BGangway: "BGangway",
}

File diff suppressed because one or more lines are too long

View File

@ -273,14 +273,22 @@ func allClickEquipmentPostion(equipmentName: String) -> Vector2:
var ScreenDoorOperateWindowPos = ScreenDoorOperateWindow.position
var AdhesiveTapePos = NodeUtils.find_child_by_name(ScreenDoorOperateWindow,'AdhesiveTape').get_global_position()
return Vector2(ScreenDoorOperateWindowPos.x+AdhesiveTapePos.x+50,ScreenDoorOperateWindowPos.y+AdhesiveTapePos.y)
else:
elif equipmentName in ['clickIsolationStripOfscreenDoor1','clickIsolationStripOfscreenDoor2','clickIsolationStripOfscreenDoor3','clickIsolationStripOfscreenDoor4'] :
var ScreenDoorOperateWindow = $platform.get_node('ScreenDoorOperate')
var ScreenDoorOperateWindowPos = ScreenDoorOperateWindow.position
var IsolationStripPos=NodeUtils.find_child_by_name(ScreenDoorOperateWindow,'IsolationStrip').get_global_position()
return Vector2(ScreenDoorOperateWindowPos.x+IsolationStripPos.x+50,ScreenDoorOperateWindowPos.y+IsolationStripPos.y)
elif equipmentName in ['escalatorKey','handheldRadio','hoarding','picketline','metalBarrier','noticeSigns'] :
var shortcutToolNode = $platform.get_node('ShortcutTool')
var shortcutToolPos=NodeUtils.find_child_by_name(shortcutToolNode,equipmentName).get_global_position()
return Vector2(shortcutToolPos.x+25,shortcutToolPos.y)
else :
return Vector2(get_viewport().size.x/2,80)
@onready var currentActiveCamera = $Camera3D
func getScreenPosition(node):
var screenPostion = $Camera3D.unproject_position(node.global_transform.origin)
var screenPostion = currentActiveCamera.unproject_position(node.global_transform.origin)
return screenPostion
@ -341,6 +349,51 @@ const allClickEquipmentInfo = {
"clickIsolationStripOfscreenDoor3": "请选择放置隔离带",
"clickAdhesiveTapeOfscreenDoor4": "请选择粘贴胶带",
"clickIsolationStripOfscreenDoor4": "请选择放置隔离带",
"escalatorKey": "请选择电扶梯钥匙", ##快捷工具
"handheldRadio": "请选择手提广播",
"hoarding": "请选择围挡",
"picketline": "请选择警戒线",
"metalBarrier": "请选择铁马",
"noticeSigns": "请选择警示牌",
"VehicleControlRoom": "请选择车控室视口", ##相机
"SparePartsCabinet": "请选择备品柜视口",
"PartsArea": "请选择备品区视口",
"StationHall": "请选择站厅视口",
"UpPlatform": "请选择上行站台视口",
"DownPlatform": "请选择下行站台视口",
"aPassageway": "请选择A出入口视口",
"StationHallAExit": "请选择站厅A出口视口",
"AEntrance": "请选择A入口视口",
"APassage": "请选择A口通道视口",
"bPassageway": "请选择B出入口视口",
"StationHallBExit": "请选择站厅B出口视口",
"BEntrance": "请选择B入口视口",
"BPassage": "请选择B口通道视口",
"CPassageway": "请选择C出入口视口",
"StationHallCExit": "请选择站厅C出口视口",
"CEntrance": "请选择C入口视口",
"CPassage": "请选择C口通道视口",
"DPassageway": "请选择D出入口视口",
"StationHallDExit": "请选择站厅D出口视口",
"DEntrance": "请选择D入口视口",
"DPassage": "请选择D口通道视口",
"StaionHallA": "请选择站厅A端视口",
"ALowerStepSwitch": "请选择A端扶梯下部开关视口",
"ATVM": "请选择A端TVM视口",
"AInboundGate": "请选择A端进站闸机视口",
"AExitGate": "请选择A端出站闸机视口",
"AUpperStep": "请选择A端扶梯上部视口",
"ALowerStep": "请选择A端扶梯下部视口",
"AGangway": "请选择A端站厅步梯口视口",
"StationHallB": "请选择站厅B端视口",
"BLowerStepSwitch": "请选择B端扶梯下部开关视口",
"BTVM": "请选择B端TVM视口",
"BInboundGate": "请选择B端进站闸机视口",
"BExitGate": "请选择B端出站闸机视口",
"BUpperStep": "请选择B端扶梯上部视口",
"BLowerStep": "请选择B端扶梯下部视口",
"BGangway": "请选择B端站厅步梯口视口",
"Back": "请选择返回上级视口",
}
func _ready():

View File

@ -175,3 +175,9 @@ func _on_train_come_and_leace_timeout() -> void:
self.trainComeAndOpenScreenDoor()
await get_tree().create_timer(25).timeout
self.closeScreenDoorAndTrainLeave()
func _ready():
self.currentActiveCamera = $AllCamera/PartsArea
$platform.showCameraAndShortcutTool()

View File

@ -1,9 +1,8 @@
[gd_scene load_steps=12 format=3 uid="uid://dmlksr5k23wwk"]
[gd_scene load_steps=11 format=3 uid="uid://dmlksr5k23wwk"]
[ext_resource type="Script" path="res://sceen/totalOfLargePassengerFlow.gd" id="1_5iiv2"]
[ext_resource type="PackedScene" uid="uid://cmnsn2joxo68l" path="res://sceen/platform/platform.tscn" id="1_rjva4"]
[ext_resource type="AudioStream" uid="uid://dgqmfnjgrea07" path="res://Assets/training_speech/trainComing.mp3" id="4_6ctdm"]
[ext_resource type="PackedScene" uid="uid://bo4j7dptpf7ne" path="res://UI/CameraSwitch/CameraSwitchUi.tscn" id="5_efwd0"]
[ext_resource type="PackedScene" uid="uid://bylj0hfttmmqf" path="res://sceen/Area3D/ScreenDoorWaitArea.tscn" id="6_1spme"]
[ext_resource type="PackedScene" uid="uid://nx6xnwcuq8cf" path="res://sceen/train/train.tscn" id="14_g0uwl"]
@ -71,6 +70,11 @@ script = ExtResource("1_5iiv2")
[node name="train" parent="." instance=ExtResource("14_g0uwl")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 60, 0, 0)
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.424, 1.768, 6.555)
visible = false
current = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_ux83q")
@ -117,11 +121,9 @@ wait_time = 2.0
wait_time = 2.0
[node name="trainComeAndLeace" type="Timer" parent="AllTimer"]
wait_time = 35.0
wait_time = 60.0
autostart = true
[node name="CameraSwitchUi" parent="." instance=ExtResource("5_efwd0")]
[node name="AllCamera" type="Node3D" parent="."]
[node name="SparePartsCabinet" type="Camera3D" parent="AllCamera"]