设置关门故障调整

This commit is contained in:
joylink_fanyuhong 2024-05-10 08:53:46 +08:00
parent ed46c584d4
commit 0f5f0ea488

View File

@ -92,13 +92,14 @@ enum ScreenDoor_Fault_State{
##设置故障
func setScreenDoorFault (faultType:ScreenDoor_Fault_State)-> void:
screenDoorFaultState = faultType
print(screenDoorFaultState, faultType, 'ppp')
if faultType == ScreenDoor_Fault_State.glassBreakage :
$leftDoor_broken.visible = true
$leftDoor_broken/AudioStreamPlayer.play()
elif faultType == ScreenDoor_Fault_State.openFault :
$MTD.material_override = mtd_fault_material
elif faultType == ScreenDoor_Fault_State.closeFault :
$MTD.material_override = mtd_fault_material
#elif faultType == ScreenDoor_Fault_State.closeFault :
#$MTD.material_override = mtd_fault_material
##恢复故障
func removeScreenDoorFault ()-> void:
@ -139,4 +140,3 @@ func _set_mtd(dark):
func _ready():
$MTD.material_override = mtd_material
_set_mtd(is_dark)
$SpotLight3D.hide()