1
This commit is contained in:
@@ -20,8 +20,6 @@ namespace Net.Project.B.Interaction
|
||||
/// </summary>
|
||||
public interface IWorldInteractable
|
||||
{
|
||||
public int Id { get; }
|
||||
public IWorldInteractable Root { get; }
|
||||
public IWorldInteractionType InteractionType { get; }
|
||||
public object WorldObject { get; set; }
|
||||
}
|
||||
@@ -30,18 +28,6 @@ namespace Net.Project.B.Interaction
|
||||
/// </summary>
|
||||
public interface IWorldInteractionService
|
||||
{
|
||||
/// <summary>
|
||||
/// 注册可互动对象
|
||||
/// </summary>
|
||||
/// <param name="interactable"></param>
|
||||
/// <returns></returns>
|
||||
public bool Register(IWorldInteractable interactable);
|
||||
/// <summary>
|
||||
/// 注销可互动对象
|
||||
/// </summary>
|
||||
/// <param name="interactable"></param>
|
||||
/// <returns></returns>
|
||||
public bool Unregister(IWorldInteractable interactable);
|
||||
/// <summary>
|
||||
/// 尝试获取互动
|
||||
/// </summary>
|
||||
|
@@ -11,14 +11,16 @@ namespace Net.Project.B.Interaction
|
||||
public class WorldInteractable : IWorldInteractable,IWorldNode
|
||||
{
|
||||
public GameObject gameObject;
|
||||
public int Id => gameObject.GetInstanceID();
|
||||
public IWorldInteractable Root => this;
|
||||
public IWorldInteractionType InteractionType => null;
|
||||
|
||||
public object WorldObject
|
||||
{
|
||||
get => gameObject;
|
||||
set => throw new NotImplementedException("Can do that");
|
||||
set
|
||||
{
|
||||
if (value is GameObject go) gameObject = go;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user