更换模型+psl面板显示开关门状态
This commit is contained in:
parent
0f5129ad6e
commit
3873a0944d
Binary file not shown.
@ -3,7 +3,7 @@
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://dcb5802jnmcw5"
|
||||
uid="uid://cs2j1a16rmnb1"
|
||||
path="res://.godot/imported/ScreenDoor.blend-cde2cb6ac7086f29e7c3ce0b181169e6.scn"
|
||||
|
||||
[deps]
|
||||
|
Binary file not shown.
@ -3,7 +3,7 @@
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://dw3o1udrsmru8"
|
||||
uid="uid://jymloyquqs1n"
|
||||
path="res://.godot/imported/platform.blend-2dad7e4d1f4e9a77d6073d479fc8760e.scn"
|
||||
|
||||
[deps]
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 454 KiB After Width: | Height: | Size: 495 KiB |
@ -1,14 +1,12 @@
|
||||
extends Sprite2D
|
||||
|
||||
@onready var open_light: Sprite2D = $"../../Light/openLight"
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
set_process_input(true)
|
||||
if $"../..".buttonLightType == $"../..".ButtonLightType.red:
|
||||
if $"../..".buttonType == $"../..".ButtonType.red:
|
||||
var icon = preload("res://Assets/psl/按钮_红.png")
|
||||
self.set_texture(icon)
|
||||
elif $"../..".buttonLightType == $"../..".ButtonLightType.black:
|
||||
elif $"../..".buttonType == $"../..".ButtonType.black:
|
||||
var icon = preload("res://Assets/psl/按钮_黑.png")
|
||||
self.set_texture(icon)
|
||||
|
||||
@ -28,5 +26,4 @@ func _input(event):
|
||||
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
|
||||
var flag2 = test_enter()
|
||||
if flag2:
|
||||
open_light.visible = !open_light.visible
|
||||
$"../..".clickButtonSignal.emit(open_light.visible,$"../..")
|
||||
$"../..".clickButtonSignal.emit(true,$"../..")
|
||||
|
@ -1,26 +0,0 @@
|
||||
extends VBoxContainer
|
||||
|
||||
enum ButtonLightType{
|
||||
green,# 绿色按钮
|
||||
red,#红色按钮
|
||||
black,#黑色按钮
|
||||
}
|
||||
|
||||
@export var buttonLightType:ButtonLightType
|
||||
|
||||
@export var buttonHasLight:bool
|
||||
|
||||
@export var lightText:String
|
||||
|
||||
@export var buttonText:String
|
||||
|
||||
signal clickButtonSignal(openLight:bool,button)
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
$Button/MarginContainer/Label.text=buttonText
|
||||
if buttonHasLight:
|
||||
$Light.visible = true
|
||||
$Light/MarginContainer/Label.text=lightText
|
||||
else:
|
||||
$Light.visible = false
|
@ -1,72 +0,0 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://c31r8s27j4dcm"]
|
||||
|
||||
[ext_resource type="Script" path="res://UI/psl/button_light.gd" id="1_yjnd3"]
|
||||
[ext_resource type="Texture2D" uid="uid://7aq7b45v8ubb" path="res://Assets/psl/按钮背景.png" id="2_yyiso"]
|
||||
[ext_resource type="Texture2D" uid="uid://ba266bheb3xrt" path="res://Assets/psl/指示灯_绿.png" id="3_w1wja"]
|
||||
[ext_resource type="Texture2D" uid="uid://c3b0oum7t4qp4" path="res://Assets/psl/指示灯亮_绿.png" id="4_lrh4r"]
|
||||
[ext_resource type="Texture2D" uid="uid://dsj7nbbmesf2c" path="res://Assets/psl/按钮_绿.png" id="5_8iola"]
|
||||
[ext_resource type="Script" path="res://UI/psl/Button.gd" id="6_4mynr"]
|
||||
|
||||
[node name="ButtonLight" type="VBoxContainer"]
|
||||
scale = Vector2(0.6, 0.6)
|
||||
script = ExtResource("1_yjnd3")
|
||||
buttonHasLight = true
|
||||
|
||||
[node name="Light" type="TextureRect" parent="."]
|
||||
layout_mode = 2
|
||||
focus_mode = 2
|
||||
texture = ExtResource("2_yyiso")
|
||||
|
||||
[node name="closeLight" type="Sprite2D" parent="Light"]
|
||||
position = Vector2(64, 119)
|
||||
scale = Vector2(0.8, 0.8)
|
||||
texture = ExtResource("3_w1wja")
|
||||
|
||||
[node name="openLight" type="Sprite2D" parent="Light"]
|
||||
visible = false
|
||||
position = Vector2(64, 119)
|
||||
scale = Vector2(0.8, 0.8)
|
||||
texture = ExtResource("4_lrh4r")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Light"]
|
||||
layout_mode = 0
|
||||
offset_right = 104.0
|
||||
offset_bottom = 110.0
|
||||
theme_override_constants/margin_left = 24
|
||||
theme_override_constants/margin_top = -38
|
||||
|
||||
[node name="Label" type="Label" parent="Light/MarginContainer"]
|
||||
modulate = Color(0.00392157, 0, 0, 1)
|
||||
custom_minimum_size = Vector2(80, 0)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 18
|
||||
text = "灯"
|
||||
horizontal_alignment = 1
|
||||
autowrap_mode = 2
|
||||
|
||||
[node name="Button" type="TextureRect" parent="."]
|
||||
layout_mode = 2
|
||||
focus_mode = 2
|
||||
texture = ExtResource("2_yyiso")
|
||||
|
||||
[node name="Button" type="Sprite2D" parent="Button"]
|
||||
position = Vector2(64, 119)
|
||||
scale = Vector2(0.8, 0.8)
|
||||
texture = ExtResource("5_8iola")
|
||||
script = ExtResource("6_4mynr")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Button"]
|
||||
layout_mode = 0
|
||||
offset_right = 104.0
|
||||
offset_bottom = 110.0
|
||||
theme_override_constants/margin_left = 24
|
||||
theme_override_constants/margin_top = -38
|
||||
|
||||
[node name="Label" type="Label" parent="Button/MarginContainer"]
|
||||
modulate = Color(0.00392157, 0, 0, 1)
|
||||
custom_minimum_size = Vector2(80, 0)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 18
|
||||
text = "按钮"
|
||||
horizontal_alignment = 1
|
||||
autowrap_mode = 2
|
17
UI/psl/button_model.gd
Normal file
17
UI/psl/button_model.gd
Normal file
@ -0,0 +1,17 @@
|
||||
extends VBoxContainer
|
||||
|
||||
enum ButtonType{
|
||||
green,# 绿色按钮
|
||||
red,#红色按钮
|
||||
black,#黑色按钮
|
||||
}
|
||||
|
||||
@export var buttonType:ButtonType
|
||||
|
||||
@export var buttonText:String
|
||||
|
||||
signal clickButtonSignal(click:bool,button)
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
$Button/MarginContainer/Label.text=buttonText
|
37
UI/psl/button_model.tscn
Normal file
37
UI/psl/button_model.tscn
Normal file
@ -0,0 +1,37 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://c31r8s27j4dcm"]
|
||||
|
||||
[ext_resource type="Script" path="res://UI/psl/button_model.gd" id="1_5equs"]
|
||||
[ext_resource type="Texture2D" uid="uid://7aq7b45v8ubb" path="res://Assets/psl/按钮背景.png" id="2_25wt4"]
|
||||
[ext_resource type="Texture2D" uid="uid://dsj7nbbmesf2c" path="res://Assets/psl/按钮_绿.png" id="3_ak2sf"]
|
||||
[ext_resource type="Script" path="res://UI/psl/Button.gd" id="4_w4uq3"]
|
||||
|
||||
[node name="ButtonModel" type="VBoxContainer"]
|
||||
scale = Vector2(0.6, 0.6)
|
||||
script = ExtResource("1_5equs")
|
||||
|
||||
[node name="Button" type="TextureRect" parent="."]
|
||||
layout_mode = 2
|
||||
focus_mode = 2
|
||||
texture = ExtResource("2_25wt4")
|
||||
|
||||
[node name="Button" type="Sprite2D" parent="Button"]
|
||||
position = Vector2(64, 119)
|
||||
scale = Vector2(0.8, 0.8)
|
||||
texture = ExtResource("3_ak2sf")
|
||||
script = ExtResource("4_w4uq3")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Button"]
|
||||
layout_mode = 0
|
||||
offset_right = 104.0
|
||||
offset_bottom = 110.0
|
||||
theme_override_constants/margin_left = 24
|
||||
theme_override_constants/margin_top = -38
|
||||
|
||||
[node name="Label" type="Label" parent="Button/MarginContainer"]
|
||||
modulate = Color(0.00392157, 0, 0, 1)
|
||||
custom_minimum_size = Vector2(80, 0)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 18
|
||||
text = "按钮"
|
||||
horizontal_alignment = 1
|
||||
autowrap_mode = 2
|
32
UI/psl/light_model.gd
Normal file
32
UI/psl/light_model.gd
Normal file
@ -0,0 +1,32 @@
|
||||
extends VBoxContainer
|
||||
|
||||
enum LightType{
|
||||
green,# 绿色按钮
|
||||
red,#红色按钮
|
||||
}
|
||||
|
||||
@export var lightType:LightType
|
||||
|
||||
@export var lightText:String
|
||||
|
||||
signal clickButtonSignal(openLight:bool,button)
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
$Light/MarginContainer/Label.text=lightText
|
||||
if lightType ==LightType.green :
|
||||
var icon = preload("res://Assets/psl/指示灯_绿.png")
|
||||
var icon2 = preload("res://Assets/psl/指示灯亮_绿.png")
|
||||
$Light/closeLight.set_texture(icon)
|
||||
$Light/openLight.set_texture(icon2)
|
||||
elif lightType ==LightType.red :
|
||||
var icon = preload("res://Assets/psl/指示灯_红.png")
|
||||
var icon2 = preload("res://Assets/psl/指示灯亮_红.png")
|
||||
$Light/closeLight.set_texture(icon)
|
||||
$Light/openLight.set_texture(icon2)
|
||||
|
||||
func openLight () -> void:
|
||||
$Light/openLight.visible = true
|
||||
|
||||
func closeLight () -> void:
|
||||
$Light/openLight.visible = false
|
41
UI/psl/light_model.tscn
Normal file
41
UI/psl/light_model.tscn
Normal file
@ -0,0 +1,41 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://p7uurq4exr6q"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://7aq7b45v8ubb" path="res://Assets/psl/按钮背景.png" id="1_f8f24"]
|
||||
[ext_resource type="Script" path="res://UI/psl/light_model.gd" id="1_na6l0"]
|
||||
[ext_resource type="Texture2D" uid="uid://ba266bheb3xrt" path="res://Assets/psl/指示灯_绿.png" id="2_3l74d"]
|
||||
[ext_resource type="Texture2D" uid="uid://c3b0oum7t4qp4" path="res://Assets/psl/指示灯亮_绿.png" id="3_s43bg"]
|
||||
|
||||
[node name="LightModel" type="VBoxContainer"]
|
||||
script = ExtResource("1_na6l0")
|
||||
|
||||
[node name="Light" type="TextureRect" parent="."]
|
||||
layout_mode = 2
|
||||
focus_mode = 2
|
||||
texture = ExtResource("1_f8f24")
|
||||
|
||||
[node name="closeLight" type="Sprite2D" parent="Light"]
|
||||
position = Vector2(64, 119)
|
||||
scale = Vector2(0.8, 0.8)
|
||||
texture = ExtResource("2_3l74d")
|
||||
|
||||
[node name="openLight" type="Sprite2D" parent="Light"]
|
||||
visible = false
|
||||
position = Vector2(64, 119)
|
||||
scale = Vector2(0.8, 0.8)
|
||||
texture = ExtResource("3_s43bg")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Light"]
|
||||
layout_mode = 0
|
||||
offset_right = 104.0
|
||||
offset_bottom = 110.0
|
||||
theme_override_constants/margin_left = 24
|
||||
theme_override_constants/margin_top = -38
|
||||
|
||||
[node name="Label" type="Label" parent="Light/MarginContainer"]
|
||||
modulate = Color(0.00392157, 0, 0, 1)
|
||||
custom_minimum_size = Vector2(80, 0)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 18
|
||||
text = "灯"
|
||||
horizontal_alignment = 1
|
||||
autowrap_mode = 2
|
@ -18,7 +18,7 @@ func _on_close_requested():
|
||||
func onHandleSignal(openLight: bool, keySwitch: Variant) -> void:
|
||||
print(openLight,keySwitch,666)
|
||||
|
||||
|
||||
##显影psl相关钥匙操作
|
||||
func shouPSLAllowHandleKey():
|
||||
$MarginContainer/GridContainer/PSLAllow.shouHandleKey()
|
||||
|
||||
@ -55,3 +55,15 @@ func _on_open_key_window_mouse_entered() -> void:
|
||||
|
||||
func _on_open_key_window_mouse_exited() -> void:
|
||||
$openKeyWindow.set_default_cursor_shape(Control.CursorShape.CURSOR_ARROW)
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if self.visible :
|
||||
if $"..".allScreenDoorClose() :
|
||||
$MarginContainer/GridContainer/MarginContainer/VBoxContainer/AllScreenDoorCloseLight.openLight()
|
||||
else :
|
||||
$MarginContainer/GridContainer/MarginContainer/VBoxContainer/AllScreenDoorCloseLight.closeLight()
|
||||
if $"..".hasScreenDoorOpen():
|
||||
$MarginContainer/GridContainer/VBoxContainer/ScreenDoorOpenLight.openLight()
|
||||
else:
|
||||
$MarginContainer/GridContainer/VBoxContainer/ScreenDoorOpenLight.closeLight()
|
||||
|
||||
|
@ -1,12 +1,13 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://dppmr7ifqt8oa"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://dppmr7ifqt8oa"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://bycedcl2nwwlu" path="res://ui_theme.tres" id="1_oaabl"]
|
||||
[ext_resource type="FontFile" uid="uid://bkbpyidjguavf" path="res://Assets/FeiHuaSongTi-2.ttf" id="2_xva5j"]
|
||||
[ext_resource type="Script" path="res://UI/psl/psl_window.gd" id="3_xodem"]
|
||||
[ext_resource type="Texture2D" uid="uid://dkohhsnyl7dq8" path="res://Assets/psl/psl背景大.png" id="4_cpydh"]
|
||||
[ext_resource type="PackedScene" uid="uid://ur86pfy4w0so" path="res://UI/psl/key_switch.tscn" id="6_8mvyb"]
|
||||
[ext_resource type="PackedScene" uid="uid://p7uurq4exr6q" path="res://UI/psl/light_model.tscn" id="6_nn68f"]
|
||||
[ext_resource type="Texture2D" uid="uid://cpmlwpev7rvbp" path="res://Assets/打开钥匙面板钥匙.png" id="7_643a1"]
|
||||
[ext_resource type="PackedScene" uid="uid://c31r8s27j4dcm" path="res://UI/psl/button_light.tscn" id="7_l5iwy"]
|
||||
[ext_resource type="PackedScene" uid="uid://c31r8s27j4dcm" path="res://UI/psl/button_model.tscn" id="7_p8tve"]
|
||||
|
||||
[node name="psl" type="Window"]
|
||||
title = "psl操作面板"
|
||||
@ -49,17 +50,30 @@ theme_override_constants/margin_left = 35
|
||||
theme_override_constants/margin_right = 35
|
||||
theme_override_constants/margin_bottom = 35
|
||||
|
||||
[node name="CloseDoorButton" parent="MarginContainer/GridContainer/MarginContainer" instance=ExtResource("7_l5iwy")]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/GridContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="AllScreenDoorCloseLight" parent="MarginContainer/GridContainer/MarginContainer/VBoxContainer" instance=ExtResource("6_nn68f")]
|
||||
layout_mode = 2
|
||||
lightText = "全部门关闭紧锁指"
|
||||
|
||||
[node name="CloseDoorButton" parent="MarginContainer/GridContainer/MarginContainer/VBoxContainer" instance=ExtResource("7_p8tve")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 6
|
||||
buttonLightType = 1
|
||||
lightText = "全部门关闭紧锁指"
|
||||
buttonType = 1
|
||||
buttonText = "关门按钮"
|
||||
|
||||
[node name="OpenDoorButton" parent="MarginContainer/GridContainer" instance=ExtResource("7_l5iwy")]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/GridContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ScreenDoorOpenLight" parent="MarginContainer/GridContainer/VBoxContainer" instance=ExtResource("6_nn68f")]
|
||||
layout_mode = 2
|
||||
lightType = 1
|
||||
lightText = "开门到位指示灯"
|
||||
|
||||
[node name="OpenDoorButton" parent="MarginContainer/GridContainer/VBoxContainer" instance=ExtResource("7_p8tve")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 6
|
||||
lightText = "开门到位指示灯"
|
||||
buttonText = "开门按钮"
|
||||
|
||||
[node name="InterlockReleaseSwitch" parent="MarginContainer/GridContainer" instance=ExtResource("6_8mvyb")]
|
||||
@ -76,16 +90,16 @@ theme_override_constants/margin_bottom = 35
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/GridContainer/MarginContainer2"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="IBPHandle" parent="MarginContainer/GridContainer/MarginContainer2/VBoxContainer" instance=ExtResource("6_8mvyb")]
|
||||
[node name="IBPHandleLight" parent="MarginContainer/GridContainer/MarginContainer2/VBoxContainer" instance=ExtResource("6_nn68f")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 6
|
||||
size_flags_horizontal = 4
|
||||
lightType = 1
|
||||
lightText = "IBP操作指示灯"
|
||||
|
||||
[node name="LightTestButton" parent="MarginContainer/GridContainer/MarginContainer2/VBoxContainer" instance=ExtResource("7_l5iwy")]
|
||||
[node name="LightTestButton" parent="MarginContainer/GridContainer/MarginContainer2/VBoxContainer" instance=ExtResource("7_p8tve")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 6
|
||||
buttonLightType = 2
|
||||
buttonHasLight = false
|
||||
size_flags_horizontal = 4
|
||||
buttonType = 2
|
||||
buttonText = "灯测试按钮"
|
||||
|
||||
[node name="PSTHandle" parent="MarginContainer/GridContainer" instance=ExtResource("6_8mvyb")]
|
||||
@ -93,21 +107,18 @@ layout_mode = 2
|
||||
size_flags_horizontal = 6
|
||||
lightText = "PST操作指示灯"
|
||||
|
||||
[node name="trainDepartsButton" parent="MarginContainer/GridContainer" instance=ExtResource("7_l5iwy")]
|
||||
[node name="trainDepartsButton" parent="MarginContainer/GridContainer" instance=ExtResource("7_p8tve")]
|
||||
layout_mode = 2
|
||||
buttonHasLight = false
|
||||
buttonText = "发车按钮"
|
||||
|
||||
[node name="interconnectedCloseButton" parent="MarginContainer/GridContainer" instance=ExtResource("7_l5iwy")]
|
||||
[node name="interconnectedCloseButton" parent="MarginContainer/GridContainer" instance=ExtResource("7_p8tve")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 6
|
||||
buttonLightType = 1
|
||||
buttonHasLight = false
|
||||
buttonType = 1
|
||||
buttonText = "联动关门按钮"
|
||||
|
||||
[node name="interconnectedOpenButton" parent="MarginContainer/GridContainer" instance=ExtResource("7_l5iwy")]
|
||||
[node name="interconnectedOpenButton" parent="MarginContainer/GridContainer" instance=ExtResource("7_p8tve")]
|
||||
layout_mode = 2
|
||||
buttonHasLight = false
|
||||
buttonText = "联动开门按钮"
|
||||
|
||||
[node name="openKeyWindow" type="TextureRect" parent="."]
|
||||
@ -121,11 +132,10 @@ texture = ExtResource("7_643a1")
|
||||
[connection signal="close_requested" from="." to="." method="_on_close_requested"]
|
||||
[connection signal="clickKeySwitchSignal" from="MarginContainer/GridContainer/PSLAllow" to="." method="onHandleSignal"]
|
||||
[connection signal="removeKey" from="MarginContainer/GridContainer/PSLAllow" to="." method="remove_key"]
|
||||
[connection signal="clickButtonSignal" from="MarginContainer/GridContainer/MarginContainer/CloseDoorButton" to="." method="onHandleSignal"]
|
||||
[connection signal="clickButtonSignal" from="MarginContainer/GridContainer/OpenDoorButton" to="." method="onHandleSignal"]
|
||||
[connection signal="clickButtonSignal" from="MarginContainer/GridContainer/MarginContainer/VBoxContainer/CloseDoorButton" to="." method="onHandleSignal"]
|
||||
[connection signal="clickButtonSignal" from="MarginContainer/GridContainer/VBoxContainer/OpenDoorButton" to="." method="onHandleSignal"]
|
||||
[connection signal="clickKeySwitchSignal" from="MarginContainer/GridContainer/InterlockReleaseSwitch" to="." method="onHandleSignal"]
|
||||
[connection signal="removeKey" from="MarginContainer/GridContainer/InterlockReleaseSwitch" to="." method="remove_key"]
|
||||
[connection signal="clickKeySwitchSignal" from="MarginContainer/GridContainer/MarginContainer2/VBoxContainer/IBPHandle" to="." method="onHandleSignal"]
|
||||
[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"]
|
||||
|
@ -1,11 +1,5 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://conr05dk6dgbf"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dcb5802jnmcw5" path="res://Model/ScreenDoor.blend" id="1_1eowb"]
|
||||
[ext_resource type="PackedScene" uid="uid://cs2j1a16rmnb1" path="res://Model/ScreenDoor.blend" id="1_1eowb"]
|
||||
|
||||
[node name="ScreenDoor" instance=ExtResource("1_1eowb")]
|
||||
|
||||
[node name="PBM1_PBM1_polie" parent="." index="5"]
|
||||
visible = false
|
||||
|
||||
[node name="PBM1_PBM1_JIAOBU" parent="." index="7"]
|
||||
visible = false
|
||||
|
@ -26,6 +26,13 @@ func allScreenDoorClose ()-> bool:
|
||||
return false
|
||||
return true
|
||||
|
||||
##有屏蔽门关门到位
|
||||
func hasScreenDoorOpen ()-> bool:
|
||||
for child in screenDoorALL:
|
||||
if child.screenDoorState == ScreenDoor.ScreenDoor_State.open :
|
||||
return true
|
||||
return false
|
||||
|
||||
func _ready() -> void:
|
||||
var screenDoor_scene = preload("res://sceen/platform/screenDoor.tscn")
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[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"]
|
||||
[ext_resource type="PackedScene" uid="uid://jymloyquqs1n" path="res://Model/platform.blend" id="1_qvyng"]
|
||||
[ext_resource type="PackedScene" uid="uid://d0lqunjq25ro8" path="res://sceen/platform/psl.tscn" id="2_wj0sf"]
|
||||
[ext_resource type="PackedScene" uid="uid://b41ml6vpfik6v" path="res://UI/LCB/lcb.tscn" id="3_f0qkt"]
|
||||
[ext_resource type="PackedScene" uid="uid://c1rooma5e6ir4" path="res://sceen/platform/jjtc.tscn" id="3_rpfjx"]
|
||||
@ -14,7 +14,6 @@
|
||||
script = ExtResource("1_kerxo")
|
||||
|
||||
[node name="platform" parent="." instance=ExtResource("1_qvyng")]
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="PSL" parent="." instance=ExtResource("2_wj0sf")]
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=37 format=3 uid="uid://bc2dnsyx16kk6"]
|
||||
[gd_scene load_steps=41 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"]
|
||||
@ -8,6 +8,7 @@
|
||||
[ext_resource type="Texture2D" uid="uid://bywpyj1w7nk86" path="res://Model/textures/haerbin_jz_menkuangyanse_BL.png" id="6_8lvxg"]
|
||||
[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"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1s8t2"]
|
||||
resource_name = "Material #2137405273"
|
||||
@ -390,6 +391,46 @@ _surfaces = [{
|
||||
blend_shape_mode = 0
|
||||
shadow_mesh = SubResource("ArrayMesh_jy7t1")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2uw5n"]
|
||||
resource_name = "14 - DefaultTS"
|
||||
transparency = 4
|
||||
cull_mode = 2
|
||||
albedo_texture = ExtResource("9_da8bg")
|
||||
metallic = 1.0
|
||||
roughness = 0.858579
|
||||
|
||||
[sub_resource type="ArrayMesh" id="ArrayMesh_xyf5j"]
|
||||
_surfaces = [{
|
||||
"aabb": AABB(-1.28, 0, -0.9856, 2.56, 1e-05, 1.9712),
|
||||
"format": 34896613377,
|
||||
"index_count": 6,
|
||||
"index_data": PackedByteArray(1, 0, 3, 0, 2, 0, 3, 0, 1, 0, 0, 0),
|
||||
"name": "14 - DefaultTS",
|
||||
"primitive": 3,
|
||||
"uv_scale": Vector4(0, 0, 0, 0),
|
||||
"vertex_count": 4,
|
||||
"vertex_data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0)
|
||||
}]
|
||||
blend_shape_mode = 0
|
||||
|
||||
[sub_resource type="ArrayMesh" id="ArrayMesh_1trd0"]
|
||||
resource_name = "ScreenDoor_网格_007"
|
||||
_surfaces = [{
|
||||
"aabb": AABB(-1.28, 0, -0.9856, 2.56, 1e-05, 1.9712),
|
||||
"attribute_data": PackedByteArray(0, 0, 225, 58, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 225, 58),
|
||||
"format": 34896613399,
|
||||
"index_count": 6,
|
||||
"index_data": PackedByteArray(1, 0, 3, 0, 2, 0, 3, 0, 1, 0, 0, 0),
|
||||
"material": SubResource("StandardMaterial3D_2uw5n"),
|
||||
"name": "14 - DefaultTS",
|
||||
"primitive": 3,
|
||||
"uv_scale": Vector4(0, 0, 0, 0),
|
||||
"vertex_count": 4,
|
||||
"vertex_data": PackedByteArray(0, 0, 0, 0, 0, 0, 255, 191, 0, 0, 0, 0, 255, 255, 255, 191, 255, 255, 0, 0, 255, 255, 255, 191, 255, 255, 0, 0, 0, 0, 255, 191, 255, 255, 255, 127, 255, 255, 255, 127, 255, 255, 255, 127, 255, 255, 255, 127)
|
||||
}]
|
||||
blend_shape_mode = 0
|
||||
shadow_mesh = SubResource("ArrayMesh_xyf5j")
|
||||
|
||||
[node name="screenDoor" type="Node3D"]
|
||||
script = ExtResource("1_nse1y")
|
||||
|
||||
@ -455,6 +496,11 @@ visible = false
|
||||
mesh = SubResource("ArrayMesh_ycs86")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[node name="dimiantishi" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.5433, 0.870711, 2.58114)
|
||||
mesh = SubResource("ArrayMesh_1trd0")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[connection signal="clickLcbSignal" from="LCB" to="." method="_on_lcb_click"]
|
||||
[connection signal="animation_finished" from="LeftAnimationPlayer" to="." method="_on_left_animation_player_animation_finished"]
|
||||
[connection signal="input_event" from="screenDoorArea3D" to="screenDoorArea3D" method="_on_input_event"]
|
||||
|
Loading…
Reference in New Issue
Block a user