Пример #1
0
    private IEnumerator WaitUntilDestroyed()
    {
        while (!FinishedExplodeAnimation || !FinishedExplodeAudio)
        {
            yield return(null);
        }

        //Allow for specific behaviour first.
        enemyTypeBehaviour.ReactToExplode();

        Destroy(gameObject);
    }