Пример #1
0
    IEnumerator EngagementDrop()
    {
        yield return(new WaitForSeconds(1)); //Waits one second then takes away 1 from Engagement.

        EngagementLevels   -= 1;
        EngagementBar.value = EngagementLevels;

        if (EngagementLevels <= 0)
        {
            GameController.GameOverScreen(); // If Engagement hits 0, activate the GameOverScreen function on the GameController script.
        }

        StartCoroutine(EngagementDrop());
    }