示例#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);
 }