refactor():重构编辑系统,不再需要添加额外的脚本作为可编辑的入口了

This commit is contained in:
2025-10-21 16:40:41 +08:00
parent 1ce3d1a0d8
commit 93b83b3af3
37 changed files with 186 additions and 199 deletions

View File

@@ -1,30 +0,0 @@
using UnityEngine;
using Script.Gameplay.Interface;
namespace Script.Gameplay.Facility
{
public abstract class InteractableBaseController : MonoBehaviour, IInteractable
{
public bool Interactable = true;
public string GetInteractPrompt()
{
return "按F进行交互";
}
public virtual void Interact(GameObject interactor)
{
if (!Interactable) return;
Debug.Log($"{gameObject.name} 被 {interactor.name} 交互了!");
}
public void OnGazeEnter(GameObject editor)
{
// 修改鼠标指针或高亮显示物体等
}
public void OnGazeExit(GameObject editor)
{
// 恢复鼠标指针或取消高亮显示物体等
}
}
}