using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
//VR手柄控制
public interface IVRInput
{
///
/// 启用/禁用手柄交互功能
///
///
void SetInteractable(bool interactable);
}
//流程节点步骤行为控制接口
public interface IStepNodeAction
{
///
/// 激活时注入流程名称 和步骤行为结束事件 开始允许交互
///
///
void Active(ProcessEnum stepName,UnityAction nodeFinishedEvent);
///
/// 退出激活 无法继续交互 操作完成时调用
///
///
void UnActive(ProcessEnum stepName);
}
//可抓取物体交互接口
public interface IVRGrabOperater
{
///
/// 被放下时
///
void UnGrabbed();
///
/// 被抓起时
///
void Grabbed();
}
//简化触发操作物体接口
public interface IVRSimoleOperater
{
//触发时执行
void OnTrigger();
}
//流程管理接口
public interface IStep
{
//添加流程完成事件
void RegisterStepOverEvent();
//移除流程完成事件
void RemoveStepOverEvent();
}
//固定器
public interface IFixator
{
//固定器状态
FixatorStateEnum FixatorState { get; }
//注册固定器固定状态变化事件
void ReisterStateChanged(UnityAction unityAction);
//注销变化事件
void RemoveStateChanged(UnityAction unityAction);
///
/// 限制其他物体
///
void Locking();
///
/// 解除对其他物体的限制
///
void UnLocking();
}
//被固定物体
public interface IFixed :IVRInput
{
///
/// 当前固定状态
///
FixedStateEnum CurrentFixedState { get; }
//初始化固定器
void InitFixator(IFixator [] fixators);
//固定器发生变化时触发
void FixatorChanged(IFixator fixator,FixatorStateEnum fixatorState);
}
///
/// 被固定物体状态
///
public enum FixedStateEnum
{
///
/// 完全锁紧状态
///
Fixed,
///
/// 半锁紧状态 例如4个螺丝只拧了3个
///
HalfFixed,
///
/// 自由状态
///
Free,
}
///
/// 固定器状态
///
public enum FixatorStateEnum
{
///
/// 锁紧状态
///
Locking,
///
/// 打开状态
///
UnLocking,
}