This commit is contained in:
soul-walker 2024-05-08 16:56:24 +08:00
commit 6c8aa8ef80
12 changed files with 208 additions and 46 deletions

Binary file not shown.

View File

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://k0e2shfdjyrq"
path="res://.godot/imported/glass-breaking.mp3-48587bf4763194802507d785eef82d16.mp3str"
[deps]
source_file="res://Assets/music/glass-breaking.mp3"
dest_files=["res://.godot/imported/glass-breaking.mp3-48587bf4763194802507d785eef82d16.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -3,25 +3,26 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dipiewtuqhdd0"
path="res://.godot/imported/GD_SDFSDF_liang.jpg-0fe1e510228e1ecaa2db83a782a07a15.ctex"
path.s3tc="res://.godot/imported/GD_SDFSDF_liang.jpg-0fe1e510228e1ecaa2db83a782a07a15.s3tc.ctex"
metadata={
"vram_texture": false
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://Model/textures/GD_SDFSDF_liang.jpg"
dest_files=["res://.godot/imported/GD_SDFSDF_liang.jpg-0fe1e510228e1ecaa2db83a782a07a15.ctex"]
dest_files=["res://.godot/imported/GD_SDFSDF_liang.jpg-0fe1e510228e1ecaa2db83a782a07a15.s3tc.ctex"]
[params]
compress/mode=0
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
@ -31,4 +32,4 @@ process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
detect_3d/compress_to=0

View File

@ -102,9 +102,9 @@ size_flags_horizontal = 4
buttonType = 2
buttonText = "灯测试按钮"
[node name="PSTHandle" parent="MarginContainer/GridContainer" instance=ExtResource("6_nn68f")]
[node name="PSTHandle" parent="MarginContainer/GridContainer" instance=ExtResource("6_8mvyb")]
layout_mode = 2
lightType = 1
size_flags_horizontal = 6
lightText = "PST操作指示灯"
[node name="trainDepartsButton" parent="MarginContainer/GridContainer" instance=ExtResource("7_p8tve")]
@ -137,6 +137,7 @@ texture = ExtResource("7_643a1")
[connection signal="clickKeySwitchSignal" from="MarginContainer/GridContainer/InterlockReleaseSwitch" to="." method="onHandleSignal"]
[connection signal="removeKey" from="MarginContainer/GridContainer/InterlockReleaseSwitch" to="." method="remove_key"]
[connection signal="clickButtonSignal" from="MarginContainer/GridContainer/MarginContainer2/VBoxContainer/LightTestButton" to="." method="onHandleSignal"]
[connection signal="clickKeySwitchSignal" from="MarginContainer/GridContainer/PSTHandle" to="." method="onHandleSignal"]
[connection signal="clickButtonSignal" from="MarginContainer/GridContainer/trainDepartsButton" to="." method="onHandleSignal"]
[connection signal="clickButtonSignal" from="MarginContainer/GridContainer/interconnectedCloseButton" to="." method="onHandleSignal"]
[connection signal="clickButtonSignal" from="MarginContainer/GridContainer/interconnectedOpenButton" to="." method="onHandleSignal"]

View File

@ -1,5 +1,12 @@
[gd_scene load_steps=2 format=3 uid="uid://conr05dk6dgbf"]
[gd_scene load_steps=4 format=3 uid="uid://conr05dk6dgbf"]
[ext_resource type="PackedScene" uid="uid://cs2j1a16rmnb1" path="res://Model/ScreenDoor.blend" id="1_1eowb"]
[ext_resource type="Texture2D" uid="uid://dipiewtuqhdd0" path="res://Model/textures/GD_SDFSDF_liang.jpg" id="2_s487p"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_e37q8"]
albedo_texture = ExtResource("2_s487p")
[node name="ScreenDoor" instance=ExtResource("1_1eowb")]
[node name="JH_GD_MTD" parent="." index="3"]
material_override = SubResource("StandardMaterial3D_e37q8")

View File

@ -44,12 +44,15 @@ enum ScreenDoor_State{
func openScreenDoor (isUseLCBKey=false)-> void:
if screenDoorState == ScreenDoor_State.close and (screenDoorFaultState != ScreenDoor_Fault_State.openFault or isUseLCBKey):
screenDoorState=ScreenDoor_State.opening
$Timer.connect('timeout', _on_timer_timeout)
$Timer.start(0.5)
##关闭屏蔽门
func closeScreenDoor (isUseLCBKey=false)-> void:
if screenDoorState == ScreenDoor_State.open and (screenDoorFaultState != ScreenDoor_Fault_State.closeFault or isUseLCBKey):
screenDoorState=ScreenDoor_State.closeing
func _on_left_animation_player_animation_finished(anim_name: StringName) -> void:
@ -57,6 +60,10 @@ func _on_left_animation_player_animation_finished(anim_name: StringName) -> void
screenDoorState = ScreenDoor_State.open
elif anim_name == 'leftClose':
screenDoorState = ScreenDoor_State.close
$Timer.stop()
is_dark = true
_set_mtd(is_dark)
## 屏蔽门的故障枚举
enum ScreenDoor_Fault_State{
@ -76,13 +83,14 @@ enum ScreenDoor_Fault_State{
##设置故障
func setScreenDoorFault (faultType:ScreenDoor_Fault_State)-> void:
screenDoorFaultState = faultType
if faultType == ScreenDoor_Fault_State.glassBreakage :
$leftDoor_broken.visible = true
$leftDoor_broken/AudioStreamPlayer.play()
##恢复故障
func removeScreenDoorFault ()-> void:
screenDoorFaultState = ScreenDoor_Fault_State.noFault
##以下是lcb相关
class LcbKeyWindow :
var keyName: String
@ -100,3 +108,20 @@ func _on_lcb_click() -> void:
##点击屏蔽门
signal clicksScreenDoorSignal(screenDoor,mousePosition)
var is_dark = true
func _on_timer_timeout():
is_dark = !is_dark
_set_mtd(is_dark)
func _set_mtd(dark):
if is_dark:
$MTD.set_instance_shader_parameter("color_dark", 0.5)
$SpotLight3D.hide()
else:
$MTD.set_instance_shader_parameter("color_dark", 1.5)
$SpotLight3D.show()
func _ready():
_set_mtd(is_dark)
$SpotLight3D.hide()

View File

@ -1,14 +0,0 @@
shader_type spatial;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
// Called for every pixel the material is visible on.
}
//void light() {
// Called for every pixel for every light affecting the material.
// Uncomment to replace the default light processing function with this one.
//}

View File

@ -1,7 +1,8 @@
[gd_scene load_steps=41 format=3 uid="uid://bc2dnsyx16kk6"]
[gd_scene load_steps=45 format=3 uid="uid://bc2dnsyx16kk6"]
[ext_resource type="Script" path="res://sceen/platform/screenDoor.gd" id="1_nse1y"]
[ext_resource type="Texture2D" uid="uid://57t8x7rlqk7y" path="res://Model/textures/GD_SDFSDF_an.jpg" id="2_rf1ed"]
[ext_resource type="Texture2D" uid="uid://dipiewtuqhdd0" path="res://Model/textures/GD_SDFSDF_liang.jpg" id="2_runrf"]
[ext_resource type="Texture2D" uid="uid://jrx8rifckwtb" path="res://Model/textures/haerbin_jz_menkuangyanse87.png" id="3_0l1gg"]
[ext_resource type="PackedScene" uid="uid://0ys58lvdq51b" path="res://sceen/platform/lcb.tscn" id="4_t5qy2"]
[ext_resource type="Script" path="res://sceen/platform/screenDoorArea3D.gd" id="5_8p3um"]
@ -9,21 +10,81 @@
[ext_resource type="Texture2D" uid="uid://bam8omg8k1bhe" path="res://Model/textures/2cengtietu_zst111.png" id="7_flsdv"]
[ext_resource type="Texture2D" uid="uid://eogu2aigjbda" path="res://Model/textures/Gd_ZTM.jpg" id="8_aqfjl"]
[ext_resource type="Texture2D" uid="uid://co0ggcy26r38g" path="res://Model/textures/2cengtietu_zst.png" id="9_da8bg"]
[ext_resource type="AudioStream" uid="uid://k0e2shfdjyrq" path="res://Assets/music/glass-breaking.mp3" id="9_kpf37"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1s8t2"]
[sub_resource type="Shader" id="Shader_qbwwy"]
code = "// NOTE: Shader automatically converted from Godot Engine 4.2.2.stable's StandardMaterial3D.
shader_type spatial;
render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx;
uniform vec4 albedo : source_color;
uniform sampler2D texture_albedo : source_color,filter_linear_mipmap,repeat_enable;
uniform float point_size : hint_range(0,128);
uniform float roughness : hint_range(0,1);
uniform sampler2D texture_metallic : hint_default_white,filter_linear_mipmap,repeat_enable;
uniform vec4 metallic_texture_channel;
uniform sampler2D texture_roughness : hint_roughness_r,filter_linear_mipmap,repeat_enable;
uniform float specular;
uniform float metallic;
uniform vec3 uv1_scale;
uniform vec3 uv1_offset;
uniform vec3 uv2_scale;
uniform vec3 uv2_offset;
uniform float color_dark = 0.5;
void vertex() {
UV=UV*uv1_scale.xy+uv1_offset.xy;
}
void fragment() {
vec2 base_uv = UV;
vec4 albedo_tex = texture(texture_albedo,base_uv);
ALBEDO = albedo.rgb * albedo_tex.rgb * color_dark;
float metallic_tex = dot(texture(texture_metallic,base_uv),metallic_texture_channel);
METALLIC = metallic_tex * metallic;
vec4 roughness_texture_channel = vec4(1.0,0.0,0.0,0.0);
float roughness_tex = dot(texture(texture_roughness,base_uv),roughness_texture_channel);
ROUGHNESS = roughness_tex * roughness;
SPECULAR = specular;
}
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_7cioj"]
render_priority = 0
shader = SubResource("Shader_qbwwy")
shader_parameter/albedo = Color(1, 1, 1, 1)
shader_parameter/point_size = 1.0
shader_parameter/roughness = 1.0
shader_parameter/metallic_texture_channel = null
shader_parameter/specular = 0.5
shader_parameter/metallic = 0.0
shader_parameter/uv1_scale = Vector3(1, 1, 1)
shader_parameter/uv1_offset = Vector3(0, 0, 0)
shader_parameter/uv2_scale = Vector3(1, 1, 1)
shader_parameter/uv2_offset = Vector3(0, 0, 0)
shader_parameter/color_dark = 1.0
shader_parameter/texture_albedo = ExtResource("2_runrf")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_c3ofc"]
resource_name = "Material #2137405273"
cull_mode = 2
albedo_texture = ExtResource("2_rf1ed")
metallic = 1.0
roughness = 0.858579
[sub_resource type="ArrayMesh" id="ArrayMesh_2pewo"]
[sub_resource type="ArrayMesh" id="ArrayMesh_ddu8p"]
_surfaces = [{
"aabb": AABB(-0.123623, -0.0377295, -0.0186468, 0.247246, 0.075459, 0.0372938),
"format": 34896613377,
"index_count": 60,
"index_data": PackedByteArray(2, 0, 9, 0, 8, 0, 9, 0, 2, 0, 0, 0, 10, 0, 6, 0, 11, 0, 6, 0, 10, 0, 4, 0, 9, 0, 4, 0, 10, 0, 4, 0, 9, 0, 0, 0, 1, 0, 7, 0, 3, 0, 7, 0, 1, 0, 5, 0, 8, 0, 7, 0, 11, 0, 7, 0, 8, 0, 3, 0, 2, 0, 4, 0, 0, 0, 4, 0, 2, 0, 6, 0, 3, 0, 9, 0, 1, 0, 9, 0, 3, 0, 8, 0, 5, 0, 11, 0, 7, 0, 11, 0, 5, 0, 10, 0, 9, 0, 5, 0, 1, 0, 5, 0, 9, 0, 10, 0, 8, 0, 6, 0, 2, 0, 6, 0, 8, 0, 11, 0),
"lods": [2.70705e-05, PackedByteArray(9, 0, 2, 0, 0, 0, 9, 0, 3, 0, 2, 0, 3, 0, 9, 0, 1, 0, 6, 0, 5, 0, 4, 0, 5, 0, 6, 0, 7, 0, 2, 0, 4, 0, 0, 0, 1, 0, 7, 0, 3, 0, 9, 0, 4, 0, 5, 0, 4, 0, 9, 0, 0, 0, 7, 0, 1, 0, 5, 0, 2, 0, 7, 0, 6, 0, 7, 0, 2, 0, 3, 0, 4, 0, 2, 0, 6, 0, 9, 0, 5, 0, 1, 0)],
"lods": [0.0772937, PackedByteArray(2, 0, 9, 0, 8, 0, 9, 0, 2, 0, 0, 0, 9, 0, 3, 0, 8, 0, 3, 0, 9, 0, 1, 0, 4, 0, 9, 0, 0, 0, 9, 0, 4, 0, 1, 0, 1, 0, 7, 0, 3, 0, 7, 0, 1, 0, 4, 0, 4, 0, 2, 0, 7, 0, 2, 0, 4, 0, 0, 0, 7, 0, 8, 0, 3, 0, 8, 0, 7, 0, 2, 0)],
"name": "Material #2137405273",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
@ -32,24 +93,24 @@ _surfaces = [{
}]
blend_shape_mode = 0
[sub_resource type="ArrayMesh" id="ArrayMesh_qyh1f"]
[sub_resource type="ArrayMesh" id="ArrayMesh_28g0p"]
resource_name = "ScreenDoor_网格"
_surfaces = [{
"aabb": AABB(-0.123623, -0.0377295, -0.0186468, 0.247246, 0.075459, 0.0372938),
"attribute_data": PackedByteArray(64, 4, 46, 215, 147, 17, 204, 239, 147, 17, 108, 55, 250, 238, 204, 239, 250, 238, 108, 55, 77, 252, 46, 215, 64, 4, 156, 147, 147, 17, 254, 122, 250, 238, 254, 122, 77, 252, 156, 147, 166, 37, 103, 206, 232, 218, 103, 206, 166, 37, 99, 156, 232, 218, 99, 156, 71, 128, 254, 122, 71, 128, 204, 239, 71, 128, 108, 55, 71, 128, 103, 206, 71, 128, 99, 156, 147, 17, 204, 239, 250, 238, 204, 239, 77, 252, 46, 215, 64, 4, 156, 147, 147, 17, 254, 122, 147, 17, 254, 122, 250, 238, 254, 122, 166, 37, 103, 206, 166, 37, 103, 206, 166, 37, 103, 206, 232, 218, 103, 206, 232, 218, 103, 206, 232, 218, 103, 206, 166, 37, 99, 156, 166, 37, 99, 156, 232, 218, 99, 156, 232, 218, 99, 156, 232, 218, 99, 156, 71, 128, 204, 239, 71, 128, 204, 239, 71, 128, 204, 239),
"attribute_data": PackedByteArray(147, 17, 108, 55, 147, 17, 204, 239, 64, 4, 46, 215, 250, 238, 108, 55, 250, 238, 204, 239, 77, 252, 46, 215, 147, 17, 254, 122, 147, 17, 254, 122, 64, 4, 156, 147, 250, 238, 254, 122, 250, 238, 254, 122, 77, 252, 156, 147, 166, 37, 103, 206, 166, 37, 103, 206, 166, 37, 103, 206, 232, 218, 103, 206, 232, 218, 103, 206, 232, 218, 103, 206, 166, 37, 99, 156, 166, 37, 99, 156, 166, 37, 99, 156, 232, 218, 99, 156, 232, 218, 99, 156, 232, 218, 99, 156, 71, 128, 254, 122, 71, 128, 254, 122, 71, 128, 108, 55, 71, 128, 204, 239, 71, 128, 103, 206, 71, 128, 103, 206, 71, 128, 99, 156, 71, 128, 99, 156, 166, 37, 103, 206),
"format": 34896613399,
"index_count": 60,
"index_data": PackedByteArray(7, 0, 16, 0, 14, 0, 16, 0, 7, 0, 2, 0, 17, 0, 12, 0, 18, 0, 12, 0, 17, 0, 10, 0, 15, 0, 10, 0, 17, 0, 10, 0, 15, 0, 1, 0, 5, 0, 13, 0, 9, 0, 13, 0, 5, 0, 11, 0, 14, 0, 13, 0, 18, 0, 13, 0, 14, 0, 8, 0, 6, 0, 10, 0, 0, 0, 10, 0, 6, 0, 12, 0, 8, 0, 16, 0, 4, 0, 16, 0, 8, 0, 14, 0, 11, 0, 18, 0, 13, 0, 18, 0, 11, 0, 17, 0, 15, 0, 11, 0, 3, 0, 11, 0, 15, 0, 17, 0, 14, 0, 12, 0, 7, 0, 12, 0, 14, 0, 18, 0),
"lods": [2.70705e-05, PackedByteArray(16, 0, 7, 0, 2, 0, 16, 0, 8, 0, 7, 0, 8, 0, 16, 0, 4, 0, 12, 0, 11, 0, 10, 0, 11, 0, 12, 0, 13, 0, 6, 0, 10, 0, 0, 0, 5, 0, 13, 0, 9, 0, 37, 0, 26, 0, 29, 0, 27, 0, 38, 0, 19, 0, 34, 0, 21, 0, 30, 0, 23, 0, 35, 0, 32, 0, 36, 0, 24, 0, 25, 0, 28, 0, 22, 0, 33, 0, 39, 0, 31, 0, 20, 0)],
"material": SubResource("StandardMaterial3D_1s8t2"),
"index_data": PackedByteArray(6, 0, 26, 0, 24, 0, 26, 0, 6, 0, 0, 0, 28, 0, 18, 0, 30, 0, 18, 0, 28, 0, 12, 0, 27, 0, 13, 0, 29, 0, 13, 0, 27, 0, 1, 0, 5, 0, 23, 0, 11, 0, 23, 0, 5, 0, 17, 0, 25, 0, 22, 0, 31, 0, 22, 0, 25, 0, 10, 0, 8, 0, 14, 0, 2, 0, 14, 0, 8, 0, 20, 0, 9, 0, 26, 0, 3, 0, 26, 0, 9, 0, 24, 0, 15, 0, 30, 0, 21, 0, 30, 0, 15, 0, 28, 0, 27, 0, 16, 0, 4, 0, 16, 0, 27, 0, 29, 0, 25, 0, 19, 0, 7, 0, 19, 0, 25, 0, 31, 0),
"lods": [0.0772937, PackedByteArray(6, 0, 26, 0, 24, 0, 26, 0, 6, 0, 0, 0, 26, 0, 9, 0, 24, 0, 9, 0, 26, 0, 3, 0, 13, 0, 27, 0, 1, 0, 27, 0, 13, 0, 4, 0, 5, 0, 21, 0, 11, 0, 21, 0, 5, 0, 12, 0, 12, 0, 8, 0, 21, 0, 8, 0, 32, 0, 2, 0, 22, 0, 25, 0, 10, 0, 25, 0, 22, 0, 7, 0)],
"material": SubResource("StandardMaterial3D_c3ofc"),
"name": "Material #2137405273",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 40,
"vertex_data": PackedByteArray(0, 0, 0, 0, 0, 0, 206, 207, 0, 0, 0, 0, 0, 0, 132, 217, 0, 0, 0, 0, 0, 0, 132, 217, 255, 255, 0, 0, 0, 0, 132, 217, 255, 255, 0, 0, 0, 0, 132, 217, 255, 255, 0, 0, 0, 0, 206, 207, 0, 0, 255, 255, 0, 0, 206, 207, 0, 0, 255, 255, 0, 0, 132, 217, 255, 255, 255, 255, 0, 0, 132, 217, 255, 255, 255, 255, 0, 0, 206, 207, 53, 23, 66, 33, 254, 255, 148, 156, 201, 232, 66, 33, 254, 255, 148, 156, 53, 23, 188, 222, 255, 255, 148, 156, 201, 232, 188, 222, 255, 255, 148, 156, 255, 127, 255, 255, 0, 0, 194, 218, 255, 127, 0, 0, 0, 0, 194, 218, 255, 127, 0, 0, 0, 0, 194, 218, 255, 127, 66, 33, 254, 255, 194, 154, 255, 127, 188, 222, 255, 255, 194, 154, 0, 0, 0, 0, 0, 0, 229, 193, 255, 255, 0, 0, 0, 0, 27, 197, 255, 255, 0, 0, 0, 0, 192, 180, 0, 0, 255, 255, 0, 0, 64, 181, 0, 0, 255, 255, 0, 0, 233, 183, 0, 0, 255, 255, 0, 0, 32, 186, 255, 255, 255, 255, 0, 0, 249, 191, 53, 23, 66, 33, 254, 255, 215, 168, 53, 23, 66, 33, 254, 255, 20, 176, 53, 23, 66, 33, 254, 255, 248, 149, 201, 232, 66, 33, 254, 255, 14, 169, 201, 232, 66, 33, 254, 255, 66, 150, 201, 232, 66, 33, 254, 255, 248, 183, 53, 23, 188, 222, 255, 255, 234, 169, 53, 23, 188, 222, 255, 255, 43, 149, 201, 232, 188, 222, 255, 255, 17, 151, 201, 232, 188, 222, 255, 255, 8, 169, 201, 232, 188, 222, 255, 255, 40, 176, 255, 127, 0, 0, 0, 0, 179, 181, 255, 127, 0, 0, 0, 0, 191, 179, 255, 127, 0, 0, 0, 0, 7, 189, 236, 71, 249, 206, 226, 49, 252, 145, 226, 49, 252, 145, 253, 17, 29, 78, 253, 17, 29, 78, 250, 78, 18, 56, 4, 177, 236, 199, 1, 238, 225, 177, 28, 206, 2, 110, 18, 184, 5, 49, 237, 53, 45, 189, 45, 61, 17, 74, 209, 194, 237, 181, 17, 202, 209, 66, 255, 255, 255, 127, 0, 0, 255, 127, 0, 0, 255, 127, 0, 0, 255, 127, 255, 255, 255, 127, 235, 51, 143, 134, 135, 6, 251, 77, 210, 60, 216, 17, 47, 195, 217, 241, 241, 250, 55, 71, 94, 234, 216, 60, 59, 207, 166, 128, 98, 32, 102, 173, 42, 40, 211, 180, 175, 92, 95, 217, 28, 46, 201, 94, 186, 94, 39, 28, 212, 52, 222, 88, 192, 206, 213, 164, 189, 163, 31, 225, 125, 171, 60, 44, 52, 230, 253, 87, 98, 221, 236, 79, 126, 1, 128, 126, 171, 24, 171, 152, 244, 23, 11, 104)
"vertex_count": 33,
"vertex_data": PackedByteArray(0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 133, 181, 0, 0, 0, 0, 0, 0, 242, 169, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 133, 181, 255, 255, 0, 0, 0, 0, 242, 169, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 133, 181, 0, 0, 255, 255, 0, 0, 242, 169, 255, 255, 255, 255, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 133, 181, 255, 255, 255, 255, 0, 0, 242, 169, 53, 23, 66, 33, 254, 255, 0, 128, 53, 23, 66, 33, 254, 255, 133, 181, 53, 23, 66, 33, 254, 255, 242, 169, 201, 232, 66, 33, 254, 255, 0, 128, 201, 232, 66, 33, 254, 255, 133, 181, 201, 232, 66, 33, 254, 255, 242, 169, 53, 23, 188, 222, 255, 255, 0, 128, 53, 23, 188, 222, 255, 255, 133, 181, 53, 23, 188, 222, 255, 255, 242, 169, 201, 232, 188, 222, 255, 255, 0, 128, 201, 232, 188, 222, 255, 255, 133, 181, 201, 232, 188, 222, 255, 255, 242, 169, 255, 127, 255, 255, 0, 0, 255, 255, 255, 127, 255, 255, 0, 0, 133, 181, 255, 127, 0, 0, 0, 0, 255, 255, 255, 127, 0, 0, 0, 0, 133, 181, 255, 127, 66, 33, 254, 255, 0, 128, 255, 127, 66, 33, 254, 255, 133, 181, 255, 127, 188, 222, 255, 255, 0, 128, 255, 127, 188, 222, 255, 255, 133, 181, 53, 23, 66, 33, 254, 255, 249, 156, 255, 255, 255, 127, 0, 0, 255, 127, 255, 127, 255, 255, 255, 255, 255, 127, 0, 0, 255, 127, 255, 127, 0, 0, 255, 255, 255, 127, 255, 255, 255, 127, 255, 127, 255, 255, 255, 255, 255, 127, 255, 255, 255, 127, 255, 127, 0, 0, 255, 127, 255, 255, 0, 0, 255, 127, 255, 127, 255, 255, 255, 127, 255, 255, 0, 0, 255, 127, 255, 127, 0, 0, 255, 127, 255, 255, 255, 255, 255, 127, 255, 127, 255, 255, 255, 127, 255, 255, 255, 255, 255, 127, 255, 127, 0, 0, 255, 255, 255, 127, 255, 255, 255, 127, 255, 255, 255, 127, 0, 0, 255, 127, 255, 127, 255, 255, 0, 0, 255, 127, 255, 127, 255, 255, 255, 255, 255, 127, 255, 127, 255, 255)
}]
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_2pewo")
shadow_mesh = SubResource("ArrayMesh_ddu8p")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_sdy05"]
resource_name = "Material #27"
@ -436,9 +497,24 @@ script = ExtResource("1_nse1y")
[node name="MTD" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.57784, 2.99429, 1.84928)
mesh = SubResource("ArrayMesh_qyh1f")
material_override = SubResource("ShaderMaterial_7cioj")
mesh = SubResource("ArrayMesh_28g0p")
skeleton = NodePath("")
[node name="SpotLight3D" type="SpotLight3D" parent="."]
transform = Transform3D(-0.687088, -0.0278916, -0.726039, 0, -0.999263, 0.0383878, -0.726575, 0.0263758, 0.686581, -6.578, 2.994, 1.88)
light_color = Color(1, 1, 0, 1)
light_energy = 1.119
light_indirect_energy = 2.194
light_volumetric_fog_energy = 0.642
light_specular = 0.0
spot_range = 0.111
spot_attenuation = 1.8025
spot_angle = 0.0
spot_angle_attenuation = 2.0
[node name="Timer" type="Timer" parent="."]
[node name="LCB" parent="." instance=ExtResource("4_t5qy2")]
[node name="left" type="MeshInstance3D" parent="."]
@ -484,6 +560,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.5433, 0.870711, 2.58114)
mesh = SubResource("ArrayMesh_idblo")
skeleton = NodePath("")
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="leftDoor_broken"]
stream = ExtResource("9_kpf37")
[node name="left_tape" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.00068, 2.06215, 1.62728)
visible = false

View File

@ -35,16 +35,20 @@ enum ScreenDoor_name{
##设置指定屏蔽门开门故障
func setAssignScreenDoorsOpenFault (screenDoorNames:Array)-> void:
for child in $platform.screenDoorALL:
var screenDoorName=String(child.name)
var screenDoorIndex=int(screenDoorName[screenDoorName.length() - 1])
if screenDoorIndex in screenDoorNames:
child.setScreenDoorFault(ScreenDoor.ScreenDoor_Fault_State.openFault)
setAssignScreenDoorsFault(screenDoorNames,ScreenDoor.ScreenDoor_Fault_State.openFault)
##设置指定屏蔽门关门故障
func setAssignScreenDoorsCloseFault (screenDoorNames:Array)-> void:
setAssignScreenDoorsFault(screenDoorNames,ScreenDoor.ScreenDoor_Fault_State.closeFault)
##设置指定屏蔽门玻璃破碎故障
func setAssignScreenDoorsGlassBreakageFault (screenDoorNames:Array)-> void:
setAssignScreenDoorsFault(screenDoorNames,ScreenDoor.ScreenDoor_Fault_State.glassBreakage)
func setAssignScreenDoorsFault (screenDoorNames:Array,faultType:ScreenDoor.ScreenDoor_Fault_State)-> void:
for child in $platform.screenDoorALL:
var screenDoorName=String(child.name)
var screenDoorIndex=int(screenDoorName[screenDoorName.length() - 1])
if screenDoorIndex in screenDoorNames:
child.setScreenDoorFault(ScreenDoor.ScreenDoor_Fault_State.closeFault)
child.setScreenDoorFault(faultType)

View File

@ -71,7 +71,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 20, 0, 0)
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.004, 1.768, 6.38)
visible = false
current = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_ux83q")

View File

@ -0,0 +1,18 @@
extends Node
## 实训名称
@export var trainingName: String = "实训"
## 场景描述
@export var trainingDesc: String = "场景描述"
func _ready():
$TrainingDescDialog.title = trainingName
$TrainingDescDialog.updateSceneDesc(trainingDesc)
func _on_training_desc_dialog_start_training():
$Timer.start()
func _on_timer_timeout() -> void:
$total.setAssignScreenDoorsGlassBreakageFault([TotalScene.ScreenDoor_name.screenDoor2])

View File

@ -0,0 +1,23 @@
[gd_scene load_steps=4 format=3 uid="uid://2p2vu21jtbtp"]
[ext_resource type="Script" path="res://trainings/trainingGlassBreakageFault/trainingGlassBreakageFault.gd" id="1_gyskf"]
[ext_resource type="PackedScene" uid="uid://qh8b3g6n3k2u" path="res://trainings/training_desc_dialog.tscn" id="2_qfrwf"]
[ext_resource type="PackedScene" uid="uid://btcksdsburk7t" path="res://sceen/total.tscn" id="3_28hir"]
[node name="trainingGlassBreakageFault" type="Node"]
script = ExtResource("1_gyskf")
trainingName = "全自动运行线路站台门滑动门玻璃破碎应急处置"
trainingDesc = "全自动运行线路站台门滑动门玻璃破碎应急处置"
[node name="TrainingDescDialog" parent="." instance=ExtResource("2_qfrwf")]
size = Vector2i(400, 300)
[node name="total" parent="." instance=ExtResource("3_28hir")]
[node name="Timer" type="Timer" parent="."]
wait_time = 2.0
one_shot = true
[connection signal="StartTraining" from="TrainingDescDialog" to="." method="_on_training_desc_dialog_start_training"]
[connection signal="close_requested" from="TrainingDescDialog" to="TrainingDescDialog" method="_on_close_requested"]
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]