feat():完成3种模式的基本运行框架
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
using 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)
|
||||
{
|
||||
// 恢复鼠标指针或取消高亮显示物体等
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user