Esempio n. 1
0
    public void CheckIngredient(Ingredient ingredient)
    {
        if (ingredient.Name == InstructionManager.GetCurrentInstruction().correctAnswer)
        {
            Debug.Log(ingredient.Name);
            OnVerifyAnswer.Invoke(Answer.Right);
        }
        else
        {
            Debug.Log("Wrong answer.");
            OnVerifyAnswer.Invoke(Answer.Wrong);
        }

        // Deactivate
        ingredient.gameObject.SetActive(false);
    }