Exemplo 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();
            }
        }
Exemplo n.º 2
0
 protected override void OnSpawnMob()
 {
     base.OnSpawnMob();
     if (ignoreInQueenCount == false)
     {
         XenoQueenAI.AddFacehuggerToCount();
     }
     ResetBehaviours();
 }
Exemplo n.º 3
0
 public override void OnSpawnServer(SpawnInfo info)
 {
     if (ignoreInQueenCount == false)
     {
         XenoQueenAI.AddFacehuggerToCount();
     }
     base.OnSpawnServer(info);
     ResetBehaviours();
     BeginSearch();
 }
Exemplo n.º 4
0
        public void OnSpawnServer(SpawnInfo info)
        {
            if (ignoreInQueenCount == false)
            {
                XenoQueenAI.AddFacehuggerToCount();
            }

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