using System;
using System.Collections;
using System.Collections.Generic;

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