Exemple #1
0
 /// <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;
 }
Exemple #4
0
 public BoundKeyEventArgs(BoundKeyState functionState, BoundKeyFunctions function)
 {
     FunctionState = functionState;
     Function      = function;
 }
Exemple #5
0
 public BoundKeyChangedMsg(BoundKeyFunctions function, BoundKeyState state)
 {
     Directed = true;
     Function = function;
     State    = state;
 }
Exemple #6
0
 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;
 }
Exemple #9
0
 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;
 }
Exemple #11
0
 /// <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;
 }
Exemple #12
0
 /// <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)
 {
 }
Exemple #13
0
 public override void ReadFromBuffer(NetIncomingMessage buffer)
 {
     KeyFunction = buffer.ReadInt32();
     NewState    = (BoundKeyState)buffer.ReadByte();
 }