/// <summary> /// Creates an instance of <see cref="StateInputCmdMessage"/>. /// </summary> /// <param name="tick">Client tick this was created.</param> /// <param name="inputFunctionId">Function this command is changing.</param> /// <param name="state">New state of the Input Function.</param> public StateInputCmdMessage(GameTick tick, ushort subTick, KeyFunctionId inputFunctionId, BoundKeyState state) : base(tick, subTick, inputFunctionId) { State = state; }
public BoundKeyEventArgs(BoundKeyState functionState, BoundKeyFunctions function) { FunctionState = functionState; Function = function; }
public PointerInputCmdArgs(ICommonSession?session, GridCoordinates coordinates, ScreenCoordinates screenCoordinates, EntityUid entityUid, BoundKeyState state, FullInputCmdMessage originalMessage) { Session = session; Coordinates = coordinates; ScreenCoordinates = screenCoordinates; EntityUid = entityUid; State = state; OriginalMessage = originalMessage; }
public BoundKeyChangedMsg(BoundKeyFunctions function, BoundKeyState state) { Directed = true; Function = function; State = state; }
public BoundKeyChangedMessage(BoundKeyFunctions function, BoundKeyState state) { Function = function; State = state; }
/// <summary> /// Creates an instance of <see cref="FullInputCmdMessage"/>. /// </summary> /// <param name="tick">Client tick this was created.</param> /// <param name="inputSequence"></param> /// <param name="inputFunctionId">Function this command is changing.</param> /// <param name="state">New state of the Input Function.</param> /// <param name="coordinates">Local Coordinates of the pointer when the command was created.</param> /// <param name="screenCoordinates"></param> public FullInputCmdMessage(GameTick tick, ushort subTick, int inputSequence, KeyFunctionId inputFunctionId, BoundKeyState state, EntityCoordinates coordinates, ScreenCoordinates screenCoordinates) : this(tick, subTick, inputFunctionId, state, coordinates, screenCoordinates, EntityUid.Invalid) { }
/// <summary> /// Creates an instance of <see cref="FullInputCmdMessage"/> with an optional Entity reference. /// </summary> /// <param name="tick">Client tick this was created.</param> /// <param name="inputFunctionId">Function this command is changing.</param> /// <param name="state">New state of the Input Function.</param> /// <param name="coordinates">Local Coordinates of the pointer when the command was created.</param> /// <param name="screenCoordinates"></param> /// <param name="uid">Entity that was under the pointer when the command was created.</param> public FullInputCmdMessage(GameTick tick, ushort subTick, KeyFunctionId inputFunctionId, BoundKeyState state, EntityCoordinates coordinates, ScreenCoordinates screenCoordinates, EntityUid uid) : base(tick, subTick, inputFunctionId) { State = state; Coordinates = coordinates; ScreenCoordinates = screenCoordinates; Uid = uid; }
public BoundKeyEventArgs(BoundKeyFunction function, BoundKeyState state) { Function = function; State = state; }
/// <summary> /// Constructs a new instance of <see cref="BoundKeyEventArgs"/>. /// </summary> /// <param name="function">Bound key that that is changing.</param> /// <param name="state">New state of the function.</param> /// <param name="pointerLocation">Current Pointer location in screen coordinates.</param> public BoundKeyEventArgs(BoundKeyFunction function, BoundKeyState state, ScreenCoordinates pointerLocation) { Function = function; State = state; PointerLocation = pointerLocation; }
/// <summary> /// Creates an instance of <see cref="StateInputCmdMessage"/>. /// </summary> /// <param name="tick">Client tick this was created.</param> /// <param name="inputFunctionId">Function this command is changing.</param> /// <param name="state">New state of the Input Function.</param> public StateInputCmdMessage(uint tick, KeyFunctionId inputFunctionId, BoundKeyState state) : base(tick, inputFunctionId) { State = state; }
/// <summary> /// Creates an instance of <see cref="FullInputCmdMessage"/>. /// </summary> /// <param name="tick">Client tick this was created.</param> /// <param name="inputFunctionId">Function this command is changing.</param> /// <param name="state">New state of the Input Function.</param> /// <param name="coordinates">Local Coordinates of the pointer when the command was created.</param> public FullInputCmdMessage(uint tick, KeyFunctionId inputFunctionId, BoundKeyState state, GridLocalCoordinates coordinates) : this(tick, inputFunctionId, state, coordinates, EntityUid.Invalid) { }
public override void ReadFromBuffer(NetIncomingMessage buffer) { KeyFunction = buffer.ReadInt32(); NewState = (BoundKeyState)buffer.ReadByte(); }