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():