Ejemplo n.º 1
0
    void OnNightComponentFinish()
    {
        helperCounter2++;
        if (helperCounter2 < 2)
        {
            return;
        }

        helperCounter2 = 0;
        nightAnimation = null;
        nightProcess   = null;

        //ProcessEvents(false);
        if (nightEvent != null)
        {
            nightEvent.Play(currentDate);
        }


        StartCoroutine(WaitForNightEventFinish());
    }
Ejemplo n.º 2
0
    void OnWorkDayComponentFinish() //called only by WorkAnimation () and WorkProcess() coroutines.
    {
        helperCounter++;
        if (helperCounter < 2)
        {
            return;
        }

        //reaching here means that both coroutines have finished
        helperCounter    = 0;
        workingAnimation = null;
        workingProcess   = null;

        //ProcessEvents(true);
        if (dayEvent != null)
        {
            dayEvent.Play(currentDate);
        }

        StartCoroutine(WaitForDayEventFinish());
    }