Beispiel #1
0
        /// <summary>
        /// Handle keydown / keyup for one of the slots via a keybinding, simulates mousedown/mouseup on it.
        /// </summary>
        /// <param name="slot">slot index to to receive the press (0 corresponds to the one labeled 1, 9 corresponds to the one labeled 0)</param>
        public void HandleHotbarKeybind(byte slot, PointerInputCmdHandler.PointerInputCmdArgs args)
        {
            var actionSlot = _slots[slot];

            actionSlot.Depress(args.State == BoundKeyState.Down);
            actionSlot.DrawModeChanged();
        }
Beispiel #2
0
 public void HandleChangeHotbarKeybind(byte hotbar, PointerInputCmdHandler.PointerInputCmdArgs args)
 {
     ChangeHotbar(hotbar);
 }
Beispiel #3
0
 public ComponentMessage PerformTargetEntityActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args)
 {
     return(new PerformTargetEntityItemActionMessage(_action.ActionType, _item.Uid, args.EntityUid));
 }
Beispiel #4
0
 public ComponentMessage PerformTargetPointActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args)
 {
     return(new PerformTargetPointItemActionMessage(_action.ActionType, _item.Uid, args.Coordinates));
 }
Beispiel #5
0
#pragma warning disable 618
        public ComponentMessage PerformTargetEntityActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args)
#pragma warning restore 618
        {
            return(new PerformTargetEntityItemActionMessage(_action.ActionType, _item, args.EntityUid));
        }
Beispiel #6
0
#pragma warning disable 618
        public ComponentMessage PerformTargetPointActionMessage(PointerInputCmdHandler.PointerInputCmdArgs args)
#pragma warning restore 618
        {
            return(new PerformTargetPointItemActionMessage(_action.ActionType, _item, args.Coordinates));
        }