CCTV相关备用
This commit is contained in:
parent
431051fc71
commit
606b62bfba
@ -53,6 +53,56 @@ func switchCamera (camera :Camera_name)-> void:
|
||||
currentActiveCameraOfLarge = camera
|
||||
cameras[camera].make_current()
|
||||
|
||||
##CCTV相关控制
|
||||
enum CCTVCameras{
|
||||
leftTopCamera3D,#左上
|
||||
rightTopCamera3D,
|
||||
leftBottomCamera3D,
|
||||
rightBottomCamera3D,
|
||||
}
|
||||
|
||||
var allCCTVCameras:Array[Camera3D] = []
|
||||
func showCCTV ()-> void:
|
||||
allCCTVCameras = [$CCTV/SubViewport/leftTopCamera3D,$CCTV/SubViewport2/rightTopCamera3D,$CCTV/SubViewport3/leftBottomCamera3D,$CCTV/SubViewport4/rightBottomCamera3D]
|
||||
var allCCTV = [$CCTV/leftTop,$CCTV/rightTop,$CCTV/leftBottom,$CCTV/rightBottom]
|
||||
for child in allCCTV :
|
||||
child.visible = true
|
||||
|
||||
##单画面
|
||||
func singleFrameCCTV ()-> void:
|
||||
$CCTV/leftTop.scale = Vector2(1,1)
|
||||
|
||||
##四画面
|
||||
func fourFrameCCTV ()-> void:
|
||||
$CCTV/leftTop.scale = Vector2(0.5,0.5)
|
||||
|
||||
##切换显示画面(默认左上角)
|
||||
var CCTVChangePos = CCTVCameras.leftTopCamera3D
|
||||
func changeCCTVleftTopFrame (camera :Camera_name,)-> void:
|
||||
copyCameraInfo(allCCTVCameras[CCTVChangePos],cameras[camera])
|
||||
|
||||
##站厅默认画面
|
||||
func stationHallDefaultFrame ()-> void:
|
||||
copyCameraInfo(allCCTVCameras[CCTVCameras.leftTopCamera3D],cameras[Camera_name.BInboundGate])
|
||||
copyCameraInfo(allCCTVCameras[CCTVCameras.rightTopCamera3D],cameras[Camera_name.BExitGate])
|
||||
copyCameraInfo(allCCTVCameras[CCTVCameras.leftBottomCamera3D],cameras[Camera_name.AInboundGate])
|
||||
copyCameraInfo(allCCTVCameras[CCTVCameras.rightBottomCamera3D],cameras[Camera_name.AExitGate])
|
||||
|
||||
##站台默认画面
|
||||
func platformDefaultFrame ()-> void:
|
||||
copyCameraInfo(allCCTVCameras[CCTVCameras.leftTopCamera3D],cameras[Camera_name.AUpperStep])
|
||||
copyCameraInfo(allCCTVCameras[CCTVCameras.rightTopCamera3D],cameras[Camera_name.DownPlatform])
|
||||
copyCameraInfo(allCCTVCameras[CCTVCameras.leftBottomCamera3D],cameras[Camera_name.BUpperStep])
|
||||
copyCameraInfo(allCCTVCameras[CCTVCameras.rightBottomCamera3D],cameras[Camera_name.BLowerStep])
|
||||
|
||||
func copyCameraInfo (needChangeCamera: Camera3D,targetCamera: Camera3D)-> void:
|
||||
needChangeCamera.position = targetCamera.position
|
||||
needChangeCamera.rotation = targetCamera.rotation
|
||||
needChangeCamera.fov = targetCamera.fov
|
||||
needChangeCamera.near = targetCamera.near
|
||||
needChangeCamera.far = targetCamera.far
|
||||
|
||||
|
||||
## 人运动区域的枚举
|
||||
enum PlayerWalkArea3D {
|
||||
entrance,#入口
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=25 format=3 uid="uid://dmlksr5k23wwk"]
|
||||
[gd_scene load_steps=29 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"]
|
||||
@ -87,6 +87,18 @@ size = Vector3(19.0941, 0.0860596, 0.659882)
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_gww5f"]
|
||||
size = Vector3(5.47445, 0.339844, 12.2169)
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_vco1y"]
|
||||
viewport_path = NodePath("CCTV/SubViewport2")
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_ysy85"]
|
||||
viewport_path = NodePath("CCTV/SubViewport3")
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_if8p3"]
|
||||
viewport_path = NodePath("CCTV/SubViewport4")
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_yiom5"]
|
||||
viewport_path = NodePath("CCTV/SubViewport")
|
||||
|
||||
[node name="totalOfLargePassengerFlow" type="Node3D"]
|
||||
script = ExtResource("1_5iiv2")
|
||||
|
||||
@ -415,6 +427,68 @@ transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 40.275
|
||||
[node name="peopleWalkFollow4" parent="AllDecoration /AllPeopleAtAUpper" instance=ExtResource("11_yuq17")]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 40.6915, 5.22, 9.38655)
|
||||
|
||||
[node name="CCTV" type="Node3D" parent="."]
|
||||
visible = false
|
||||
|
||||
[node name="SubViewport2" type="SubViewport" parent="CCTV"]
|
||||
size = Vector2i(1920, 1080)
|
||||
|
||||
[node name="rightTopCamera3D" type="Camera3D" parent="CCTV/SubViewport2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.255, 1.673, 13.34)
|
||||
fov = 62.5
|
||||
|
||||
[node name="rightTop" type="TextureRect" parent="CCTV"]
|
||||
visible = false
|
||||
offset_left = 960.0
|
||||
offset_right = 2880.0
|
||||
offset_bottom = 1080.0
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = SubResource("ViewportTexture_vco1y")
|
||||
|
||||
[node name="SubViewport3" type="SubViewport" parent="CCTV"]
|
||||
size = Vector2i(1920, 1080)
|
||||
|
||||
[node name="leftBottomCamera3D" type="Camera3D" parent="CCTV/SubViewport3"]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 37.261, 7, 9.92)
|
||||
|
||||
[node name="leftBottom" type="TextureRect" parent="CCTV"]
|
||||
visible = false
|
||||
offset_top = 540.0
|
||||
offset_right = 1920.0
|
||||
offset_bottom = 1620.0
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = SubResource("ViewportTexture_ysy85")
|
||||
|
||||
[node name="SubViewport4" type="SubViewport" parent="CCTV"]
|
||||
size = Vector2i(1920, 1080)
|
||||
|
||||
[node name="rightBottomCamera3D" type="Camera3D" parent="CCTV/SubViewport4"]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 10.776, 2.11, 10.945)
|
||||
|
||||
[node name="rightBottom" type="TextureRect" parent="CCTV"]
|
||||
visible = false
|
||||
offset_left = 960.0
|
||||
offset_top = 540.0
|
||||
offset_right = 2880.0
|
||||
offset_bottom = 1620.0
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = SubResource("ViewportTexture_if8p3")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="CCTV"]
|
||||
size = Vector2i(1920, 1080)
|
||||
|
||||
[node name="leftTopCamera3D" type="Camera3D" parent="CCTV/SubViewport"]
|
||||
transform = Transform3D(-4.37114e-08, 0.199368, -0.979925, 0, 0.979925, 0.199368, 1, 8.71465e-09, -4.28339e-08, 9.059, 8.123, 14.588)
|
||||
current = true
|
||||
fov = 51.5
|
||||
|
||||
[node name="leftTop" type="TextureRect" parent="CCTV"]
|
||||
visible = false
|
||||
offset_right = 1920.0
|
||||
offset_bottom = 1080.0
|
||||
scale = Vector2(0.5, 0.5)
|
||||
texture = SubResource("ViewportTexture_yiom5")
|
||||
|
||||
[connection signal="allClickPlatformSignal" from="platform" to="." method="_on_platform_all_click_platform_signal"]
|
||||
[connection signal="allScreenDoorLcbStateSignal" from="platform" to="." method="emitScreenDoorLcbStateChangeSignal"]
|
||||
[connection signal="animation_finished" from="trainAnimationPlayer" to="train" method="_on_train_animation_player_animation_finished"]
|
||||
|
Loading…
Reference in New Issue
Block a user