Пример #1
0
    protected virtual void Die()
    {
        IsDead           = true;
        gameObject.layer = 9; // DeadPlayers layer;
        m_deathTime      = Time.time;
        Score.Deaths++;
        Team.AddDeath();

        DeathExplosion deathExplosion = GetComponentInChildren <DeathExplosion>();

        deathExplosion?.Fire();
        m_defaultAudioSource.PlayOneShot(m_deathSound, m_deathSoundVolume);
    }