fix(Door): 修复了交互开关无法正常运行的BUG
This commit is contained in:
@@ -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();
|
||||||
|
Reference in New Issue
Block a user