You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
153 lines
3.6 KiB
153 lines
3.6 KiB
using UnityEngine; |
|
using System.Collections; |
|
using MessagePack; |
|
|
|
namespace AX.InputSystem |
|
{ |
|
/// <summary> |
|
/// 输入系统所用的命令接口 |
|
/// </summary> |
|
public interface ICommand |
|
{ |
|
void Execute(long gameObjID, CmdArgs arg); |
|
} |
|
/// <summary> |
|
/// 参数类型 |
|
/// </summary> |
|
public class CmdArgs |
|
{ |
|
public Vector3 currentCursorPos;//当前鼠标指针的位置 |
|
} |
|
/// <summary> |
|
/// 相机操作参数 |
|
/// </summary> |
|
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; |
|
} |
|
/// <summary> |
|
/// 克隆参数 |
|
/// </summary> |
|
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; |
|
} |
|
|
|
/// <summary> |
|
/// UI滚动参数 |
|
/// </summary> |
|
public class UIScrollCmdArgs : CmdArgs |
|
{ |
|
public Vector2 vctr; |
|
} |
|
/// <summary> |
|
/// 人物前进控制参数 |
|
/// </summary> |
|
public class CharacterMoveCmdArgs : CmdArgs |
|
{ |
|
public float HorizontalAD; |
|
public float VerticalSW; |
|
} |
|
/// <summary> |
|
/// 人物后退控制参数 |
|
/// </summary> |
|
public class CharacterBackCmdArgs : CmdArgs |
|
{ |
|
public bool back; |
|
} |
|
/// <summary> |
|
/// 寻路参数 |
|
/// </summary> |
|
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; |
|
} |
|
/// <summary> |
|
/// 编辑器模式与游戏模式切换参数 |
|
/// </summary> |
|
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; |
|
} |
|
} |
|
|
|
|