コード例 #1
0
ファイル: InputSequence.cs プロジェクト: furbet1992/Swipo2
        private int NextNonWhitespaceIndex()
        {
            int index = _progress;

            while (TGK_Input.IsWhitespace(RequiredInputByIndex(index)) && index < _text.Length)
            {
                index += 1;
            }

            return(index);
        }
コード例 #2
0
ファイル: InputSequence.cs プロジェクト: furbet1992/Swipo2
 /// <summary>
 /// Returns true if the sequence would accept the given input.
 /// </summary>
 public bool DoesAcceptInput(string input)
 {
     foreach (var requiredInput in AcceptableInputs)
     {
         if (TGK_Input.AreInputEqual(input, requiredInput, _isCaseSensitive))
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #3
0
 /// <summary>
 /// Adds input from the specified key.
 /// </summary>
 public void HandleKeyPress(VirtualKeyboardKey key)
 {
     OnKeyPressed(key);
     TGK_Input.AddInput(key.Input);
     SetLayer(key.NextLayer);
 }
コード例 #4
0
ファイル: InputSequence.cs プロジェクト: furbet1992/Swipo2
 private bool DoesMatchAtIndex(string input, int investigatedIndex)
 {
     return(TGK_Input.AreInputEqual(RequiredInputByIndex(investigatedIndex), input, _isCaseSensitive));
 }