Exemple #1
0
    IEnumerator BridgeBlockExplosion(GameObject block, float seconds)
    {
        yield return(new WaitForSeconds(seconds));

        if (play.GetEnableExplode())
        {
            play.PlayExplode();
        }
        //block.SetActive(false);
        GameObject exp = Instantiate(bridgeExplosionPrefab, block.transform.position, Quaternion.identity);

        Destroy(block);
        Destroy(exp, 0.3f);
    }