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

            if (ignoreInQueenCount == false)
            {
                XenoQueenAI.RemoveFacehuggerFromCount();
            }
        }
Ejemplo n.º 2
0
 protected override void OnSpawnMob()
 {
     base.OnSpawnMob();
     if (ignoreInQueenCount == false)
     {
         XenoQueenAI.AddFacehuggerToCount();
     }
     ResetBehaviours();
 }
Ejemplo n.º 3
0
 public override void OnSpawnServer(SpawnInfo info)
 {
     if (ignoreInQueenCount == false)
     {
         XenoQueenAI.AddFacehuggerToCount();
     }
     base.OnSpawnServer(info);
     ResetBehaviours();
     BeginSearch();
 }
Ejemplo n.º 4
0
        public void OnSpawnServer(SpawnInfo info)
        {
            if (ignoreInQueenCount == false)
            {
                XenoQueenAI.AddFacehuggerToCount();
            }

            mobSprite.SetToNPCLayer();
            registerObject.RestoreAllToDefault();
            simpleAnimal.SetDeadState(false);
            ResetBehaviours();
            BeginSearch();
        }
Ejemplo n.º 5
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();
            }
        }