相机切换调整
This commit is contained in:
parent
3fc27d2bb6
commit
916cdc8317
@ -11,7 +11,7 @@
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="LowerStepSwitch" type="Button" parent="HBoxContainer"]
|
||||
[node name="ALowerStepSwitch" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_7ed45")
|
||||
theme_override_styles/hover = ExtResource("2_tr3c8")
|
||||
@ -20,14 +20,14 @@ toggle_mode = true
|
||||
button_group = ExtResource("3_lh5bb")
|
||||
text = "A端扶梯下部开关"
|
||||
|
||||
[node name="TVM" type="Button" parent="HBoxContainer"]
|
||||
[node name="ATVM" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_7ed45")
|
||||
theme_override_styles/hover = ExtResource("2_tr3c8")
|
||||
theme_override_styles/pressed = ExtResource("2_tr3c8")
|
||||
text = "A端TVM"
|
||||
|
||||
[node name="InboundGate" type="Button" parent="HBoxContainer"]
|
||||
[node name="AInboundGate" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_7ed45")
|
||||
theme_override_styles/hover = ExtResource("2_tr3c8")
|
||||
@ -36,7 +36,7 @@ toggle_mode = true
|
||||
button_group = ExtResource("3_lh5bb")
|
||||
text = "A端进站闸机"
|
||||
|
||||
[node name="ExitGate" type="Button" parent="HBoxContainer"]
|
||||
[node name="AExitGate" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_7ed45")
|
||||
theme_override_styles/hover = ExtResource("2_tr3c8")
|
||||
@ -45,7 +45,7 @@ toggle_mode = true
|
||||
button_group = ExtResource("3_lh5bb")
|
||||
text = "A端出站闸机"
|
||||
|
||||
[node name="UpperStep" type="Button" parent="HBoxContainer"]
|
||||
[node name="AUpperStep" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_7ed45")
|
||||
theme_override_styles/hover = ExtResource("2_tr3c8")
|
||||
@ -54,7 +54,7 @@ toggle_mode = true
|
||||
button_group = ExtResource("3_lh5bb")
|
||||
text = "A端扶梯上部"
|
||||
|
||||
[node name="LowerStep" type="Button" parent="HBoxContainer"]
|
||||
[node name="ALowerStep" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_7ed45")
|
||||
theme_override_styles/hover = ExtResource("2_tr3c8")
|
||||
@ -63,7 +63,7 @@ toggle_mode = true
|
||||
button_group = ExtResource("3_lh5bb")
|
||||
text = "A端扶梯下部"
|
||||
|
||||
[node name="Gangway" type="Button" parent="HBoxContainer"]
|
||||
[node name="AGangway" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_7ed45")
|
||||
theme_override_styles/hover = ExtResource("2_tr3c8")
|
||||
|
@ -11,7 +11,7 @@
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="LowerStepSwitch" type="Button" parent="HBoxContainer"]
|
||||
[node name="BLowerStepSwitch" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_rp4s8")
|
||||
theme_override_styles/hover = ExtResource("2_b3fhu")
|
||||
@ -20,7 +20,7 @@ toggle_mode = true
|
||||
button_group = ExtResource("3_ijcc7")
|
||||
text = "B端扶梯下部开关"
|
||||
|
||||
[node name="TVM" type="Button" parent="HBoxContainer"]
|
||||
[node name="BTVM" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_rp4s8")
|
||||
theme_override_styles/hover = ExtResource("2_b3fhu")
|
||||
@ -29,7 +29,7 @@ toggle_mode = true
|
||||
button_group = ExtResource("3_ijcc7")
|
||||
text = "B端TVM"
|
||||
|
||||
[node name="InboundGate" type="Button" parent="HBoxContainer"]
|
||||
[node name="BInboundGate" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_rp4s8")
|
||||
theme_override_styles/hover = ExtResource("2_b3fhu")
|
||||
@ -38,7 +38,7 @@ toggle_mode = true
|
||||
button_group = ExtResource("3_ijcc7")
|
||||
text = "B端进站闸机口"
|
||||
|
||||
[node name="ExitGate" type="Button" parent="HBoxContainer"]
|
||||
[node name="BExitGate" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_rp4s8")
|
||||
theme_override_styles/hover = ExtResource("2_b3fhu")
|
||||
@ -47,7 +47,7 @@ toggle_mode = true
|
||||
button_group = ExtResource("3_ijcc7")
|
||||
text = "B端出站闸机口"
|
||||
|
||||
[node name="UpperStep" type="Button" parent="HBoxContainer"]
|
||||
[node name="BUpperStep" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_rp4s8")
|
||||
theme_override_styles/hover = ExtResource("2_b3fhu")
|
||||
@ -56,7 +56,7 @@ toggle_mode = true
|
||||
button_group = ExtResource("3_ijcc7")
|
||||
text = "B端扶梯上部"
|
||||
|
||||
[node name="LowerStep" type="Button" parent="HBoxContainer"]
|
||||
[node name="BLowerStep" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_rp4s8")
|
||||
theme_override_styles/hover = ExtResource("2_b3fhu")
|
||||
@ -65,7 +65,7 @@ toggle_mode = true
|
||||
button_group = ExtResource("3_ijcc7")
|
||||
text = "B端扶梯下部"
|
||||
|
||||
[node name="Gangway" type="Button" parent="HBoxContainer"]
|
||||
[node name="BGangway" type="Button" parent="HBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/normal = ExtResource("1_rp4s8")
|
||||
theme_override_styles/hover = ExtResource("2_b3fhu")
|
||||
|
52
UI/CameraSwitch/cameraSwitch.gd
Normal file
52
UI/CameraSwitch/cameraSwitch.gd
Normal file
@ -0,0 +1,52 @@
|
||||
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 _on_vehicle_control_room_pressed():
|
||||
switchCamera($"..".Camera_name.VehicleControlRoom)
|
||||
|
||||
|
||||
func _on_station_hall_pressed():
|
||||
switchCamera($"..".Camera_name.StationHall)
|
||||
|
||||
func _on_up_platform_pressed():
|
||||
switchCamera($"..".Camera_name.UpPlatform)
|
||||
|
||||
|
||||
func _on_down_platform_pressed():
|
||||
switchCamera($"..".Camera_name.DownPlatform)
|
||||
|
||||
|
||||
func _on_a_passageway_pressed():
|
||||
switchCamera($"..".Camera_name.APassageway)
|
||||
|
||||
|
||||
func _on_b_passageway_pressed():
|
||||
switchCamera($"..".Camera_name.BPassageway)
|
||||
|
||||
|
||||
func _on_c_passageway_pressed():
|
||||
switchCamera($"..".Camera_name.CPassageway)
|
||||
|
||||
|
||||
func _on_d_passageway_pressed():
|
||||
switchCamera($"..".Camera_name.DPassageway)
|
||||
|
||||
|
||||
func _on_staion_hall_a_pressed():
|
||||
switchCamera($"..".Camera_name.StaionHallA)
|
||||
|
||||
|
||||
func _on_station_hall_b_pressed():
|
||||
switchCamera($"..".Camera_name.StationHallB)
|
@ -1,10 +1,12 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://5s78rigi2rhw"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://5s78rigi2rhw"]
|
||||
|
||||
[ext_resource type="StyleBox" uid="uid://d2f2wgj4omqrj" path="res://UI/CameraSwitch/CameraSwitchButtonNormal.tres" id="1_sru6n"]
|
||||
[ext_resource type="Script" path="res://UI/CameraSwitch/cameraSwitch.gd" id="1_t6m5l"]
|
||||
[ext_resource type="StyleBox" uid="uid://c4cifub1prvg0" path="res://UI/CameraSwitch/CarmeraSwitchButtonPressed.tres" id="2_h26dt"]
|
||||
[ext_resource type="ButtonGroup" uid="uid://ybti5fpi5kns" path="res://UI/CameraSwitch/CameraSwitchButtonGroup.tres" id="3_00rvc"]
|
||||
|
||||
[node name="CameraSwitch" type="Node2D"]
|
||||
script = ExtResource("1_t6m5l")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
offset_right = 800.0
|
||||
@ -100,3 +102,14 @@ theme_override_styles/pressed = ExtResource("2_h26dt")
|
||||
toggle_mode = true
|
||||
button_group = ExtResource("3_00rvc")
|
||||
text = "站厅B端"
|
||||
|
||||
[connection signal="pressed" from="HBoxContainer/VehicleControlRoom" to="." method="_on_vehicle_control_room_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/StationHall" to="." method="_on_station_hall_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/UpPlatform" to="." method="_on_up_platform_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/DownPlatform" to="." method="_on_down_platform_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/APassageway" to="." method="_on_a_passageway_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/BPassageway" to="." method="_on_b_passageway_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/CPassageway" to="." method="_on_c_passageway_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/DPassageway" to="." method="_on_d_passageway_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/StaionHallA" to="." method="_on_staion_hall_a_pressed"]
|
||||
[connection signal="pressed" from="HBoxContainer/StationHallB" to="." method="_on_station_hall_b_pressed"]
|
||||
|
@ -12,6 +12,34 @@ enum Camera_name{
|
||||
DPassageway,#D出入口
|
||||
StaionHallA,#站厅A端
|
||||
StationHallB,#站厅B端
|
||||
StationHallAExit,#站厅A出口
|
||||
AEntrance,#A入口
|
||||
APassage,#A口通道
|
||||
StationHallBExit,#站厅B出口
|
||||
BEntrance,#B入口
|
||||
BPassage,#B口通道
|
||||
StationHallCExit,#站厅C出口
|
||||
CEntrance,#C入口
|
||||
CBPassage,#C口通道
|
||||
StationHallDExit,#站厅D出口
|
||||
DEntrance,#D入口
|
||||
DBPassage,#D口通道
|
||||
ALowerStepSwitch,#A端扶梯下部开关
|
||||
ATVM,#A端TVM
|
||||
AInboundGate,#A端进站闸机
|
||||
AExitGate,#A端出站闸机
|
||||
AUpperStep,#A端扶梯上部
|
||||
ALowerStep,#A端扶梯下部
|
||||
AGangway,#A端站厅步梯口
|
||||
BLowerStepSwitch,#B端扶梯下部开关
|
||||
BTVM,#B端TVM
|
||||
BInboundGate,#B端进站闸机
|
||||
BExitGate,#B端出站闸机
|
||||
BUpperStep,#B端扶梯上部
|
||||
BLowerStep,#B端扶梯下部
|
||||
BGangway,#B端站厅步梯口
|
||||
SparePartsCabinet,#备品柜
|
||||
PartsArea,#备品区
|
||||
}
|
||||
|
||||
@onready var cameras = [$VehicleControlRoom,$StationHall,$UpPlatform]
|
||||
|
Loading…
Reference in New Issue
Block a user