Ejemplo n.º 1
0
    IEnumerator destroyPlayerAfterDeath()
    {
        yield return(new WaitForSeconds(0.7f));

        GameObject.Destroy(collider);
        animations.HidePlayer();
        audioSources[0].volume = 0;
        audioSources[1].volume = 0;
        rigidBody.bodyType     = RigidbodyType2D.Static;
    }