/// <summary>
        /// What happens when the mob dies or is unconscious
        /// </summary>
        protected override void HandleDeathOrUnconscious()
        {
            base.HandleDeathOrUnconscious();

            if (ignoreInQueenCount == false)
            {
                XenoQueenAI.RemoveFacehuggerFromCount();
            }
        }
Example #2
0
        /// <summary>
        /// What happens when the mob dies or is unconscious
        /// </summary>
        protected virtual void HandleDeathOrUnconscious()
        {
            if (!IsDead || deathSoundPlayed || deathSounds.Count <= 0)
            {
                return;
            }
            deathSoundPlayed = true;

            AudioSourceParameters audioSourceParameters = new AudioSourceParameters(pitch: Random.Range(0.9f, 1.1f));

            SoundManager.PlayNetworkedAtPos(deathSounds.PickRandom(), transform.position,
                                            audioSourceParameters, sourceObj: gameObject);

            if (ignoreInQueenCount == false)
            {
                XenoQueenAI.RemoveFacehuggerFromCount();
            }
        }