Ejemplo n.º 1
0
		private void onKeyUp(object sender, KeyboardEventArgs args)
		{
            switch (SkipTrigger)
            {
                case SkipCutsceneTrigger.EscapeKeyOnly:
                    if (args.Key != Key.Escape) return;
                    break;
                case SkipCutsceneTrigger.Custom: return;
            }
            BeginSkip();
		}
Ejemplo n.º 2
0
		private async Task onKeyDown(object sender, KeyboardEventArgs args)
		{
			if (!Enabled) return;
			_keysDown.Add(args.Key);
			Direction? direction = getDirection();
			if (Mode == KeyboardMovementMode.Pressing)
			{
				if (direction == CurrentDirection) return;
			}
			else
			{
				if (direction == CurrentDirection)
				{
					if (direction == null) return;
					CurrentDirection = null;
					await _character.StopWalkingAsync();
					return;
				}
			}
			CurrentDirection = direction;
			if (direction == null) return;
			await _character.WalkAsync(getTarget(direction.Value));
		}
Ejemplo n.º 3
0
        private void onKeyDown(object sender, KeyboardEventArgs args)
        {
            if (args.Key == Key.ShiftLeft) { _leftShiftOn = true; return; }
            if (args.Key == Key.ShiftRight) { _rightShiftOn = true; return; }

            if (!IsFocused) return;
            TextBoxKeyPressingEventArgs pressingArgs = new TextBoxKeyPressingEventArgs(args.Key);
            OnPressingKey.Invoke(this, pressingArgs);
            if (pressingArgs.ShouldCancel) return;

            processKey(args.Key);
        }
Ejemplo n.º 4
0
 private void onKeyUp(object sender, KeyboardEventArgs args)
 {
     if (args.Key == Key.ShiftLeft) { _leftShiftOn = false; return; }
     if (args.Key == Key.ShiftRight) { _rightShiftOn = false; return; }
 }
Ejemplo n.º 5
0
		private async Task onKeyUp(object sender, KeyboardEventArgs args)
		{
			if (!Enabled) return;
			_keysDown.Remove(args.Key);
			if (Mode == KeyboardMovementMode.Tapping) return;
			Direction? direction = getDirection();
			if (direction == CurrentDirection) return;
			CurrentDirection = direction;
			if (direction == null)
			{
				await _character.StopWalkingAsync();
				return;
			}
			await _character.WalkAsync(getTarget(direction.Value));
		}