紧急停车调整
This commit is contained in:
parent
ce95b9f3da
commit
d22fd150e2
22
UI/JJTC/jjlc.gd
Normal file
22
UI/JJTC/jjlc.gd
Normal file
@ -0,0 +1,22 @@
|
||||
extends Window
|
||||
|
||||
|
||||
# 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 _on_jjtc_click_jjtc_signal():
|
||||
self.show()
|
||||
$"../stationKeys".show()
|
||||
$"../stationKeys".shouAllKeys()
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_close_requested():
|
||||
self.hide() # Replace with function body.
|
@ -7,38 +7,45 @@
|
||||
|
||||
[node name="jjlc" type="Window"]
|
||||
position = Vector2i(0, 36)
|
||||
size = Vector2i(512, 512)
|
||||
size = Vector2i(570, 512)
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="."]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
anchors_preset = -1
|
||||
anchor_right = 1.00351
|
||||
anchor_bottom = 1.0
|
||||
grow_vertical = 2
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer"]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 60
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="PanelContainer/VBoxContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_6dqfi")
|
||||
script = ExtResource("2_3cpku")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
offset_left = 86.0
|
||||
offset_top = 236.0
|
||||
offset_right = 150.0
|
||||
offset_bottom = 256.0
|
||||
offset_left = 146.0
|
||||
offset_top = 234.0
|
||||
offset_right = 210.0
|
||||
offset_bottom = 254.0
|
||||
texture = ExtResource("3_cilkf")
|
||||
|
||||
[node name="JJLC_Right_Rotate" type="Sprite2D" parent="."]
|
||||
position = Vector2(164, 210)
|
||||
position = Vector2(224, 210)
|
||||
rotation = 0.912807
|
||||
scale = Vector2(0.25, 0.25)
|
||||
texture = ExtResource("4_xrw3n")
|
||||
|
||||
[node name="JJLC_Left_Rotate" type="Sprite2D" parent="."]
|
||||
position = Vector2(72, 210)
|
||||
position = Vector2(132, 210)
|
||||
rotation = -0.912807
|
||||
scale = Vector2(0.25, 0.25)
|
||||
texture = ExtResource("4_xrw3n")
|
||||
flip_h = true
|
||||
|
||||
[connection signal="gui_input" from="TextureRect" to="PanelContainer/VBoxContainer/TextureRect" method="_on_texture_rect_gui_input"]
|
||||
[connection signal="gui_input" from="TextureRect" to="PanelContainer/VBoxContainer/MarginContainer/TextureRect" method="_on_texture_rect_gui_input"]
|
||||
|
18
sceen/platform/JJTC_Area3D.gd
Normal file
18
sceen/platform/JJTC_Area3D.gd
Normal file
@ -0,0 +1,18 @@
|
||||
extends Area3D
|
||||
|
||||
@onready var mouse_over = false
|
||||
|
||||
|
||||
func _input(event):
|
||||
if event is InputEventMouseButton and event.pressed:
|
||||
if mouse_over and event.button_index == MOUSE_BUTTON_LEFT:
|
||||
$"../..".clickJJTCSignal.emit()
|
||||
|
||||
func _on_mouse_entered() -> void:
|
||||
mouse_over = true
|
||||
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_POINTING_HAND)
|
||||
|
||||
|
||||
func _on_mouse_exited() -> void:
|
||||
mouse_over = false
|
||||
Input.set_default_cursor_shape(Input.CursorShape.CURSOR_ARROW)
|
@ -32,9 +32,9 @@ enum JJTC_STATE{
|
||||
func _on_texture_rect_gui_input(event):
|
||||
if event.button_mask == MouseButtonMask.MOUSE_BUTTON_MASK_LEFT && jjtc_state == JJTC_STATE.CLOSE:
|
||||
jjtc_state = JJTC_STATE.OPEN
|
||||
$"../../../TextureRect".hide()
|
||||
$"../../../JJLC_Right_Rotate".hide()
|
||||
$"../../../JJLC_Left_Rotate".hide()
|
||||
$"../../TextureRect".hide()
|
||||
$"../../JJLC_Right_Rotate".hide()
|
||||
$"../../JJLC_Left_Rotate".hide()
|
||||
#elif jjtc_state == JJTC_STATE.OPEN:
|
||||
#jjtc_state = JJTC_STATE.CLOSE
|
||||
pass
|
||||
|
4
sceen/platform/jjtc.gd
Normal file
4
sceen/platform/jjtc.gd
Normal file
@ -0,0 +1,4 @@
|
||||
extends Node3D
|
||||
|
||||
|
||||
signal clickJJTCSignal()
|
@ -1,71 +1,52 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://c1rooma5e6ir4"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://c1rooma5e6ir4"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_v2w26"]
|
||||
resource_name = "20 - Default"
|
||||
cull_mode = 2
|
||||
albedo_color = Color(0.790731, 0.790731, 0.790731, 1)
|
||||
metallic = 1.0
|
||||
roughness = 0.858579
|
||||
[ext_resource type="Script" path="res://sceen/platform/jjtc.gd" id="1_ebk0j"]
|
||||
[ext_resource type="PackedScene" uid="uid://b2b5du6g0swmc" path="res://Model/JJTC.blend" id="2_hep0w"]
|
||||
[ext_resource type="Script" path="res://sceen/platform/JJTC_Area3D.gd" id="3_j0a07"]
|
||||
|
||||
[sub_resource type="ArrayMesh" id="ArrayMesh_bglq4"]
|
||||
_surfaces = [{
|
||||
"aabb": AABB(-0.0341152, -0.0976391, -0.0343229, 0.0682304, 0.195288, 0.0686552),
|
||||
"format": 34896613377,
|
||||
"index_count": 48,
|
||||
"index_data": PackedByteArray(4, 0, 2, 0, 5, 0, 2, 0, 4, 0, 0, 0, 1, 0, 5, 0, 3, 0, 5, 0, 1, 0, 4, 0, 4, 0, 6, 0, 0, 0, 6, 0, 4, 0, 10, 0, 3, 0, 7, 0, 1, 0, 7, 0, 3, 0, 9, 0, 5, 0, 9, 0, 3, 0, 9, 0, 5, 0, 11, 0, 0, 0, 8, 0, 2, 0, 8, 0, 0, 0, 6, 0, 1, 0, 10, 0, 4, 0, 10, 0, 1, 0, 7, 0, 2, 0, 11, 0, 5, 0, 11, 0, 2, 0, 8, 0),
|
||||
"name": "20 - Default",
|
||||
"primitive": 3,
|
||||
"uv_scale": Vector4(0, 0, 0, 0),
|
||||
"vertex_count": 12,
|
||||
"vertex_data": PackedByteArray(0, 0, 251, 255, 245, 255, 0, 0, 0, 0, 0, 0, 245, 255, 0, 0, 254, 255, 251, 255, 245, 255, 0, 0, 255, 255, 0, 0, 245, 255, 0, 0, 0, 0, 254, 127, 245, 255, 0, 0, 255, 255, 254, 127, 245, 255, 0, 0, 0, 0, 251, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 255, 251, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 254, 127, 0, 0, 0, 0, 255, 255, 254, 127, 0, 0, 0, 0)
|
||||
}]
|
||||
blend_shape_mode = 0
|
||||
|
||||
[sub_resource type="ArrayMesh" id="ArrayMesh_3dac2"]
|
||||
resource_name = "screenDoor_网格_061"
|
||||
_surfaces = [{
|
||||
"aabb": AABB(-0.0341152, -0.0976391, -0.0343229, 0.0682304, 0.195288, 0.0686552),
|
||||
"attribute_data": PackedByteArray(56, 79, 145, 8, 60, 81, 142, 8, 87, 54, 157, 13, 60, 81, 142, 8, 69, 83, 145, 8, 40, 83, 7, 10, 61, 71, 157, 13, 87, 54, 80, 4, 121, 79, 142, 8, 56, 79, 248, 9, 56, 79, 248, 9, 101, 81, 7, 10, 61, 71, 80, 4, 101, 81, 7, 10, 69, 83, 248, 9, 63, 81, 145, 8, 63, 81, 145, 8, 63, 81, 145, 8, 202, 62, 157, 13, 202, 62, 80, 4, 63, 81, 248, 9, 63, 81, 248, 9, 56, 79, 254, 9, 56, 79, 254, 9, 60, 81, 251, 9, 69, 83, 254, 9, 40, 83, 155, 8, 40, 83, 155, 8, 121, 79, 251, 9, 121, 79, 251, 9, 56, 79, 139, 8, 101, 81, 155, 8, 69, 83, 139, 8, 63, 81, 254, 9, 63, 81, 254, 9, 63, 81, 139, 8, 63, 81, 139, 8, 63, 81, 139, 8),
|
||||
"format": 34896613399,
|
||||
"index_count": 48,
|
||||
"index_data": PackedByteArray(18, 0, 7, 0, 19, 0, 7, 0, 18, 0, 2, 0, 6, 0, 19, 0, 12, 0, 19, 0, 6, 0, 18, 0, 15, 0, 22, 0, 0, 0, 23, 0, 16, 0, 33, 0, 11, 0, 26, 0, 5, 0, 27, 0, 13, 0, 31, 0, 20, 0, 32, 0, 14, 0, 32, 0, 20, 0, 35, 0, 3, 0, 29, 0, 8, 0, 28, 0, 1, 0, 24, 0, 4, 0, 34, 0, 17, 0, 34, 0, 4, 0, 25, 0, 9, 0, 36, 0, 21, 0, 37, 0, 10, 0, 30, 0),
|
||||
"material": SubResource("StandardMaterial3D_v2w26"),
|
||||
"name": "20 - Default",
|
||||
"primitive": 3,
|
||||
"uv_scale": Vector4(0, 0, 0, 0),
|
||||
"vertex_count": 38,
|
||||
"vertex_data": PackedByteArray(0, 0, 251, 255, 245, 255, 84, 213, 0, 0, 251, 255, 245, 255, 255, 255, 0, 0, 251, 255, 245, 255, 255, 191, 0, 0, 251, 255, 245, 255, 255, 255, 0, 0, 0, 0, 245, 255, 84, 213, 0, 0, 0, 0, 245, 255, 255, 255, 0, 0, 0, 0, 245, 255, 255, 191, 254, 255, 251, 255, 245, 255, 255, 191, 254, 255, 251, 255, 245, 255, 255, 255, 254, 255, 251, 255, 245, 255, 84, 213, 254, 255, 251, 255, 245, 255, 84, 213, 255, 255, 0, 0, 245, 255, 255, 255, 255, 255, 0, 0, 245, 255, 255, 191, 255, 255, 0, 0, 245, 255, 255, 255, 255, 255, 0, 0, 245, 255, 84, 213, 0, 0, 254, 127, 245, 255, 84, 213, 0, 0, 254, 127, 245, 255, 84, 213, 0, 0, 254, 127, 245, 255, 84, 213, 0, 0, 254, 127, 245, 255, 255, 191, 255, 255, 254, 127, 245, 255, 255, 191, 255, 255, 254, 127, 245, 255, 84, 213, 255, 255, 254, 127, 245, 255, 84, 213, 0, 0, 251, 255, 0, 0, 84, 213, 0, 0, 251, 255, 0, 0, 84, 213, 0, 0, 251, 255, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 84, 213, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 254, 255, 251, 255, 0, 0, 255, 255, 254, 255, 251, 255, 0, 0, 255, 255, 254, 255, 251, 255, 0, 0, 84, 213, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 84, 213, 0, 0, 254, 127, 0, 0, 84, 213, 0, 0, 254, 127, 0, 0, 84, 213, 255, 255, 254, 127, 0, 0, 84, 213, 255, 255, 254, 127, 0, 0, 84, 213, 255, 255, 254, 127, 0, 0, 84, 213, 84, 85, 170, 170, 255, 127, 255, 191, 255, 127, 255, 127, 255, 127, 255, 191, 84, 85, 170, 170, 255, 127, 255, 63, 255, 127, 255, 127, 255, 127, 255, 127, 255, 127, 255, 191, 170, 170, 84, 85, 170, 170, 84, 85, 255, 127, 255, 63, 255, 127, 255, 127, 255, 127, 255, 63, 170, 170, 84, 85, 84, 85, 170, 170, 84, 85, 170, 170, 84, 85, 170, 170, 255, 127, 255, 127, 255, 127, 255, 127, 170, 170, 84, 85, 170, 170, 84, 85, 84, 85, 170, 170, 84, 85, 170, 170, 255, 127, 255, 191, 84, 85, 170, 170, 255, 127, 255, 63, 255, 127, 255, 63, 255, 127, 255, 191, 255, 127, 255, 191, 170, 170, 84, 85, 255, 127, 255, 63, 170, 170, 84, 85, 84, 85, 170, 170, 84, 85, 170, 170, 170, 170, 84, 85, 170, 170, 84, 85, 170, 170, 84, 85)
|
||||
}]
|
||||
blend_shape_mode = 0
|
||||
shadow_mesh = SubResource("ArrayMesh_bglq4")
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_7navh"]
|
||||
size = Vector3(0.07, 0.21, 0.09)
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_gubnu"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[node name="JJTC" type="Node3D"]
|
||||
script = ExtResource("1_ebk0j")
|
||||
|
||||
[node name="JJTC_Body" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.74842, 1.05459, -7.39734)
|
||||
mesh = SubResource("ArrayMesh_3dac2")
|
||||
skeleton = NodePath("")
|
||||
metadata/_edit_lock_ = true
|
||||
[node name="JJTC_Body" parent="." instance=ExtResource("2_hep0w")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1.66, 0, 0, 0, 1, 5.73, -0.67, -9.14)
|
||||
|
||||
[node name="JJTC_Area3D" type="Area3D" parent="JJTC_Body"]
|
||||
script = ExtResource("3_j0a07")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="JJTC_Body/JJTC_Area3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.478, 1.055, 1.74)
|
||||
shape = SubResource("BoxShape3D_7navh")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="."]
|
||||
size = Vector2i(200, 45)
|
||||
size = Vector2i(55, 265)
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="SubViewport"]
|
||||
offset_right = 200.0
|
||||
offset_bottom = 45.0
|
||||
offset_right = 55.0
|
||||
offset_bottom = 265.0
|
||||
color = Color(0, 0.12549, 1, 1)
|
||||
|
||||
[node name="Label" type="Label" parent="SubViewport"]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 23.0
|
||||
offset_right = 55.0
|
||||
offset_bottom = 267.0
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "紧急停车按钮"
|
||||
text = "紧
|
||||
急
|
||||
停
|
||||
车
|
||||
按
|
||||
钮"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, -3.74, 1.22, -7.2)
|
||||
transform = Transform3D(0.128, 0, 0, 0, 0.128, 0, 0, 0, 0.128, -3.75, 1.075, -7.36)
|
||||
texture = SubResource("ViewportTexture_gubnu")
|
||||
|
||||
[connection signal="mouse_entered" from="JJTC_Body/JJTC_Area3D" to="JJTC_Body/JJTC_Area3D" method="_on_mouse_entered"]
|
||||
[connection signal="mouse_exited" from="JJTC_Body/JJTC_Area3D" to="JJTC_Body/JJTC_Area3D" method="_on_mouse_exited"]
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://cmnsn2joxo68l"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://cmnsn2joxo68l"]
|
||||
|
||||
[ext_resource type="Script" path="res://sceen/platform/platform.gd" id="1_kerxo"]
|
||||
[ext_resource type="PackedScene" uid="uid://dw3o1udrsmru8" path="res://Model/platform.blend" id="1_qvyng"]
|
||||
@ -8,6 +8,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://d167och8l6jms" path="res://UI/station_keys/station_keys_window.tscn" id="4_xd08d"]
|
||||
[ext_resource type="PackedScene" uid="uid://dppmr7ifqt8oa" path="res://UI/psl/psl_window.tscn" id="6_e4hk2"]
|
||||
[ext_resource type="PackedScene" uid="uid://gjmtus0cnppi" path="res://UI/JJTC/jjlc.tscn" id="7_5su0y"]
|
||||
[ext_resource type="Script" path="res://UI/JJTC/jjlc.gd" id="9_wcp87"]
|
||||
|
||||
[node name="platform" type="Node3D"]
|
||||
script = ExtResource("1_kerxo")
|
||||
@ -18,6 +19,7 @@ metadata/_edit_lock_ = true
|
||||
[node name="PSL" parent="." instance=ExtResource("2_wj0sf")]
|
||||
|
||||
[node name="JJTC" parent="." instance=ExtResource("3_rpfjx")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.6, 0.1, 9.2)
|
||||
|
||||
[node name="LCB" parent="." instance=ExtResource("3_f0qkt")]
|
||||
position = Vector2i(518, 324)
|
||||
@ -32,7 +34,11 @@ position = Vector2i(568, 190)
|
||||
visible = false
|
||||
|
||||
[node name="jjlc" parent="." instance=ExtResource("7_5su0y")]
|
||||
position = Vector2i(518, 324)
|
||||
visible = false
|
||||
script = ExtResource("9_wcp87")
|
||||
|
||||
[connection signal="clickLPslSignal" from="PSL" to="psl" method="_on_psl_click_signal"]
|
||||
[connection signal="clickJJTCSignal" from="JJTC" to="jjlc" method="_on_jjtc_click_jjtc_signal"]
|
||||
[connection signal="close_requested" from="LCB" to="LCB" method="_on_close_requested"]
|
||||
[connection signal="close_requested" from="jjlc" to="jjlc" method="_on_close_requested"]
|
||||
|
@ -66,7 +66,7 @@ _data = {
|
||||
[node name="train" parent="." instance=ExtResource("14_g0uwl")]
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.00411, 1.76842, 6.38049)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.004, 1.768, 6.38)
|
||||
visible = false
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
|
Loading…
Reference in New Issue
Block a user