Exemple #1
0
        private int NextNonWhitespaceIndex()
        {
            int index = _progress;

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

            return(index);
        }
Exemple #2
0
 /// <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);
 }
Exemple #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);
 }
Exemple #4
0
 private bool DoesMatchAtIndex(string input, int investigatedIndex)
 {
     return(TGK_Input.AreInputEqual(RequiredInputByIndex(investigatedIndex), input, _isCaseSensitive));
 }