From cee3ac221737ee966f08ed24a42429c9a9f35451 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Fri, 10 May 2024 09:52:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E5=A4=B4=E7=81=AF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sceen/platform/screenDoor.gd | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sceen/platform/screenDoor.gd b/sceen/platform/screenDoor.gd index 81f40bf..d961891 100644 --- a/sceen/platform/screenDoor.gd +++ b/sceen/platform/screenDoor.gd @@ -71,8 +71,6 @@ func _on_left_animation_player_animation_finished(anim_name: StringName) -> void $Timer.stop() is_dark = true _set_mtd(is_dark) - if screenDoorFaultState == ScreenDoor_Fault_State.closeFault: - $SpotLight3D.show() ## 屏蔽门的故障枚举 @@ -130,11 +128,12 @@ func _on_timer_timeout(): _set_mtd(is_dark) func _set_mtd(dark): + var self_material = $MTD.get_active_material(0) if is_dark: - mtd_material.set_shader_parameter('is_dark', true) + self_material.set_shader_parameter('is_dark', true) $SpotLight3D.hide() else: - mtd_material.set_shader_parameter('is_dark', false) + self_material.set_shader_parameter('is_dark', false) $SpotLight3D.show() func _ready():