예제 #1
0
    public void OvenHeatOn()
    {
        if (GetCurrentTimerValue() < 5)
        {
            return;
        }

        GetComponent <AudioSource>().loop = false;
        GetComponent <AudioSource>().clip = ovenStart;
        GetComponent <AudioSource>().Play();
        StartCoroutine(DelayedEffect());

        heatLight.intensity = heatLightIntensity;

        heatEnabled = true;
        timerRef.StartTimer();

        foreach (GameObject o in objectsToBeCooked)
        {
            CanBeCooked cbc = o.GetComponent <CanBeCooked>();
            cbc.SetCurrentHeat(heatRef.GetValue());
            cbc.BeginCook(timerRef.GetValue());
        }
    }