Beispiel #1
0
    /// <summary>
    /// wait timer for cleaning. Will create / use a small timebar or similar if takes time.
    /// </summary>
    /// <returns></returns>
    IEnumerator BeingCleaned()
    {
        IsBeingCleaned = true;
        //lock player movement
        yield return(new WaitForSeconds(cleanUpTime));

        print("EndClean");
        if (isDestructable)
        {
            SpawnMoreMess();
        }
        else
        {
            GameManager.AddCleanScore(messPoints);
        }
        player.FinishClean(messPoints); //reactivates player movement
        Sfx.PlaySfx(CleanMessEndSfx);

        //add points to global score
        //stop clean progress bar
    }