feat(): 实现EditComponent的UI基础,引入TextMeshPro,添加了在Inside状态下不能互动物体的逻辑控制

This commit is contained in:
2025-10-18 11:00:06 +08:00
parent 2614dab342
commit b4f229d29e
85 changed files with 13841 additions and 51 deletions

View File

@@ -8,7 +8,21 @@ namespace Script.Gameplay.Facility
public class DoorInteractController : InteractableBaseController, IEditableComponent
{
[SerializeField] private LockLevel lockLevel;
[SerializeField] private bool isActive = true;
public bool IsActive
{
get => isActive;
set
{
isActive = value;
//具体被编辑的逻辑
Interactable = isActive;
}
}
public string ComponentName { get; set; } = "DoorSwitch";
public LockLevel LockLevel => lockLevel;
private bool isOpened = false;
public override void Interact(GameObject interactor)
{
if (isOpened)
@@ -23,19 +37,11 @@ namespace Script.Gameplay.Facility
}
}
public LockLevel LockLevel => lockLevel;
public void SetActive(bool active)
{
// 实现激活或禁用门的逻辑
Interactable = active;
}
private void OpenDoor()
{
Debug.Log("Open door");
}
private void CloseDoor()
{
Debug.Log("Close door");