mtd灯光初始调整
This commit is contained in:
parent
ba0517a269
commit
f5f68bbe99
@ -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"]
|
||||
|
@ -61,7 +61,8 @@ func _on_left_animation_player_animation_finished(anim_name: StringName) -> void
|
||||
elif anim_name == 'leftClose':
|
||||
screenDoorState = ScreenDoor_State.close
|
||||
$Timer.stop()
|
||||
$SpotLight3D.hide()
|
||||
is_dark = true
|
||||
_set_mtd(is_dark)
|
||||
|
||||
|
||||
## 屏蔽门的故障枚举
|
||||
@ -107,15 +108,23 @@ func _on_lcb_click() -> void:
|
||||
##点击屏蔽门
|
||||
signal clicksScreenDoorSignal(screenDoor,mousePosition)
|
||||
|
||||
var is_dark = false
|
||||
var is_dark = true
|
||||
func _on_timer_timeout():
|
||||
is_dark = !is_dark
|
||||
var material = $MTD.get_active_material(0)
|
||||
if is_dark:
|
||||
_set_mtd(is_dark)
|
||||
|
||||
func _set_mtd(dark):
|
||||
var material = $MTD.get_active_material(0)
|
||||
if is_dark:
|
||||
if material is ShaderMaterial:
|
||||
material.set_shader_parameter("color_dark", 0.5)
|
||||
$SpotLight3D.hide()
|
||||
else:
|
||||
else:
|
||||
if material is ShaderMaterial:
|
||||
material.set_shader_parameter("color_dark", 1.5)
|
||||
$SpotLight3D.show()
|
||||
$SpotLight3D.show()
|
||||
|
||||
func _ready():
|
||||
_set_mtd(is_dark)
|
||||
$SpotLight3D.hide()
|
||||
|
@ -510,7 +510,6 @@ 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)
|
||||
visible = false
|
||||
light_color = Color(1, 1, 0, 1)
|
||||
light_energy = 1.119
|
||||
light_indirect_energy = 2.194
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user