Beispiel #1
0
    void Die()
    {
        var explosion = Instantiate(deathVFX, transform.position, transform.rotation);

        Destroy(explosion, durationOfExplosion);
        Destroy(gameObject);
        AudioSource.PlayClipAtPoint(deathSound, Camera.main.transform.position, deathSoundVolume);

        _stageController.GameOverEvent();
    }