Ejemplo n.º 1
0
    private void CheckSandwich()
    {
        int errorType = 0;

        if (!m_currentSandwich.MatchesSandwich(m_desiredSandwich, out errorType))
        {
            m_sandwhichWrong.Invoke();
            if (m_failureMessageCoroutine != null)
            {
                StopCoroutine(m_failureMessageCoroutine);
            }
            m_failureMessageCoroutine = StartCoroutine(FailureMessage(DisplayError(errorType)));
        }
        else
        {
            m_sandwichCorrect.Invoke();
            m_currentCorrectSandwiches++;
        }
    }
Ejemplo n.º 2
0
 public bool IsCorrectSandwich(SandwhichType p_checkSandwich, out int p_errorType)
 {
     return(p_checkSandwich.MatchesSandwich(m_currentSandwhichType, out p_errorType));
 }