using UnityEngine;
using System.Collections;
using MessagePack;
namespace AX.InputSystem
{
///
/// 输入系统所用的命令接口
///
public interface ICommand
{
void Execute(long gameObjID, CmdArgs arg);
}
///
/// 参数类型
///
public class CmdArgs
{
public Vector3 currentCursorPos;//当前鼠标指针的位置
}
///
/// 相机操作参数
///
public class CameraCmdArgs : CmdArgs
{
public float mouseScroll;//鼠标中键滚动值
public float mouseX;//鼠标在屏幕坐标系下X方向的变化值
public float mouseY;//鼠标在屏幕坐标系下Y方向的变化值
public bool rotateStart;
public Vector3 mousePosition;//鼠标在屏幕坐标系中的当前位置
public bool dragStart;
public float keyX;
public bool targetMoveing;
public float distance;
public float x;
public float y;
}
///
/// 克隆参数
///
public class CloneCmdArgs : CmdArgs
{
public CloneObjType cloneObjType;//克隆对象类型
public bool selected;//是否选中克隆按钮
public Vector3 hitPos;
public long gameObjID;
public Vector3 mousePosition;//鼠标在屏幕坐标系中的当前位置
public Vector3 towords;//朝向
public Vector3 scale;//scale
public Vector3 ClonePos;
}
public class DrawRectSelectRangeCmdArgs : CmdArgs
{
public Vector3 mousePosition;//鼠标在屏幕坐标系中的当前位置
public bool drawRectStart;
}
///
/// UI滚动参数
///
public class UIScrollCmdArgs : CmdArgs
{
public Vector2 vctr;
}
///
/// 人物前进控制参数
///
public class CharacterMoveCmdArgs : CmdArgs
{
public float HorizontalAD;
public float VerticalSW;
}
///
/// 人物后退控制参数
///
public class CharacterBackCmdArgs : CmdArgs
{
public bool back;
}
///
/// 寻路参数
///
public class PathFindingCmdArgs : CmdArgs
{
public Vector3 hitPoint;
public long gameObjID;
}
public class UIScrollRectCmdArgs : CmdArgs
{
public Vector2 vctr;
}
public class UIDropDownValueCmdArgs : CmdArgs
{
public int chooseValue;
}
public class UIScrollBarArgs : CmdArgs
{
public float value;
}
public class UISliderArgs : CmdArgs
{
public float value;
}
public class UIToggleArgs : CmdArgs
{
public bool isOn;
}
public class UIInputFieldArgs : CmdArgs
{
public string msg;
}
///
/// 编辑器模式与游戏模式切换参数
///
public class EditorModeCtrlArgs : CmdArgs
{
public bool selected;
}
public class ObjDragCmdArgs : CmdArgs
{
public Vector3 mousePosition;//鼠标在屏幕坐标系中的当前位置
public bool dragStart;
}
public class OnDragCmdArgs : CmdArgs
{
public Vector3 position;//鼠标位置
}
public class ClickPointCmdArgs : CmdArgs
{
public long gameObjID;
}
public class UIColorPickerArgs : CmdArgs
{
[Key(2)]
public Color color;
}
public class ParticleTypeCmdArgs : CmdArgs
{
public ParticleEnum ParticleType;
}
public class WeightCmdArgs : CmdArgs
{
public float Weight;
}
}