using System; using System.Collections; using System.Collections.Generic; namespace Net.Project.B.Interaction { public enum WorldInteractionProcess { None, Hover, Started, Tap, Hold, Performed, System, Cancel, } /// /// 可互动类型 /// public interface IWorldInteractable { public bool Enabled { get; } public object WorldObject { get; set; } public int Id { get; set; } } /// /// 世界互动服务 /// public interface IWorldInteractionService { /// /// 互动 /// /// 互动者 /// 互动对象 /// 过程,例如开始,完成,结束 /// 是否互动成功 bool Interaction(object sender,IWorldInteractable interactable,WorldInteractionProcess process=WorldInteractionProcess.Performed); /// /// 互动回调 /// public event Action OnInteraction; } }