Beispiel #1
0
    private void Death()
    {
        dropItem.TriggerDrop();
        Destroy(gameObject);
        GameObject explosion = Instantiate(explosionParticles, transform.position, Quaternion.identity) as GameObject;

        Destroy(explosion, durationOfExplosion);

        AudioSource.PlayClipAtPoint(deathSound, Camera.main.transform.position, .5f);
    }