Example #1
0
    //when player press a button
    public void InputSystem(Button button)
    {
        char letter = button.GetComponentInChildren <TextMeshProUGUI>().text.ToCharArray()[0];

        UpdateAnswer(letter);
        LockEvent?.Invoke(this, EventArgs.Empty);
        if (!userInput.Contains(placeholder))
        {
            if (!CheckWinCondition())
            {
                ResetUserInput();
            }
            else
            {
                StartCoroutine(ShowTextWhenCorrect());
                StartCoroutine(ShowCompleteScreen());
            }
        }
    }
Example #2
0
 public void Toggle()
 {
     locked = !locked;
     evnt.Invoke(locked);
 }
Example #3
0
 public void Unlock()
 {
     _isLocked = false;
     LockEvent?.Invoke(this);
 }
Example #4
0
 public void Lock()
 {
     _isLocked = true;
     LockEvent?.Invoke(this);
 }