//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()); } } }
public void Toggle() { locked = !locked; evnt.Invoke(locked); }
public void Unlock() { _isLocked = false; LockEvent?.Invoke(this); }
public void Lock() { _isLocked = true; LockEvent?.Invoke(this); }