fix(Door): 修复了交互开关无法正常运行的BUG

This commit is contained in:
2025-10-18 11:42:25 +08:00
parent 30574160f9
commit 0716cbc0f7

View File

@@ -7,7 +7,6 @@ namespace Script.Gameplay.Facility
{ {
public class DoorInteractController : InteractableBaseController, IEditableComponent public class DoorInteractController : InteractableBaseController, IEditableComponent
{ {
[SerializeField] private LockLevel lockLevel;
[SerializeField] private bool isActive = true; [SerializeField] private bool isActive = true;
public bool IsActive public bool IsActive
{ {
@@ -20,11 +19,12 @@ namespace Script.Gameplay.Facility
} }
} }
public string ComponentName { get; set; } = "DoorSwitch"; public string ComponentName { get; set; } = "DoorSwitch";
public LockLevel LockLevel => lockLevel; public LockLevel LockLevel => LockLevel.Red;
private bool isOpened = false; private bool isOpened = false;
public override void Interact(GameObject interactor) public override void Interact(GameObject interactor)
{ {
if (!Interactable) return;
if (isOpened) if (isOpened)
{ {
CloseDoor(); CloseDoor();