예제 #1
0
    IEnumerator StartExplosionCount()
    {
        yield return(new WaitForSeconds(secondsToExplode));

        Explode();

        yield return(new WaitForSeconds(0.2f));

        ExplosionController explosion = generatedExplosion.GetComponent <ExplosionController> ();

        explosion.DisableColliders();
        //BoxCollider2D[] collider = generatedExplosion.GetComponents<BoxCollider2D>();
        //collider [0].enabled = false;
        //collider [1].enabled = false;

        yield return(new WaitForSeconds(0.5f));

        Destroy(generatedExplosion);
        gameObject.SetActive(false);
    }