Пример #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());
            }
        }
    }
Пример #2
0
 public void Toggle()
 {
     locked = !locked;
     evnt.Invoke(locked);
 }
Пример #3
0
 public void Unlock()
 {
     _isLocked = false;
     LockEvent?.Invoke(this);
 }
Пример #4
0
 public void Lock()
 {
     _isLocked = true;
     LockEvent?.Invoke(this);
 }