Пример #1
0
    public void Cut()
    {
        if (!data.cuttable)
        {
            return;
        }

        GameObject newCutPrefab = (GameObject)Instantiate(cutPrefab, this.GetComponent <Transform>().position, Quaternion.identity);
        Ingredient newIng       = newCutPrefab.GetComponent <Ingredient>();

        if (cookLevel == 1)
        {
            newIng.Cook();
        }
        else if (cookLevel == 2)
        {
            newIng.Burn();
        }
    }