예제 #1
0
    public IEnumerator Cleanup()
    {
        ActionProgressBar.UpdateProgress("Cleaning Map Contents", 0f);
        yield return(null);

        yield return(null);

        if (terrainManager)
        {
            ActionProgressBar.UpdateProgress("Destroying Terrain", 0f);
            yield return(null);

            yield return(null);

            terrainManager.Cleanup();
        }

        if (prefabManager)
        {
            ActionProgressBar.UpdateProgress("Destroying Prefabs", 0.33f);
            yield return(null);

            yield return(null);

            prefabManager.Cleanup();
        }

        if (pathManager)
        {
            ActionProgressBar.UpdateProgress("Destroying Paths", 0.66f);
            yield return(null);

            yield return(null);

            pathManager.Cleanup();
        }

        ActionProgressBar.Close();
    }