private void Start()
 {
     this.animator = base.transform.GetComponent <Animator>();
     this.ctd      = base.transform.parent.GetComponent <CoopMutantTransformDelayer>();
     this.rootTr   = base.transform.parent;
     this.cms      = base.transform.parent.GetComponent <CoopMutantSetup>();
 }
Example #2
0
 private void Awake()
 {
     this.bloodPropertyBlock = new MaterialPropertyBlock();
     this.cms      = base.transform.GetComponent <CoopMutantSetup>();
     this.mrs      = base.transform.GetComponentInChildren <mutantRagdollSetup>();
     this.animator = base.transform.GetComponentInChildren <Animator>();
     this.health   = base.transform.GetComponentInChildren <EnemyHealth>();
     this.setup    = base.transform.GetComponentInChildren <mutantScriptSetup>();
     this.bodyVar  = base.transform.GetComponentInChildren <setupBodyVariation>();
 }
Example #3
0
 private void Start()
 {
     this.cms = base.transform.parent.GetComponent <CoopMutantSetup>();
 }
Example #4
0
 private void OnDespawned()
 {
     base.CancelInvoke("removeSpawnCoolDown");
     this.removeSpawnBlock = false;
     base.StopCoroutine("doSpawnDummy");
     if (BoltNetwork.isServer)
     {
         BoltEntity component = base.gameObject.GetComponent <BoltEntity>();
         if (component)
         {
             UnityEngine.Object.Destroy(component);
         }
         CoopMutantSetup component2 = base.gameObject.GetComponent <CoopMutantSetup>();
         if (component2)
         {
             UnityEngine.Object.Destroy(component2);
         }
     }
     this.removeFromLists();
     if (this.setup.ai.creepy || this.setup.ai.creepy_male || this.setup.ai.creepy_baby || this.setup.ai.creepy_fat)
     {
         this.ai.target     = this.setup.currentWaypoint.transform;
         this.setup.ai.pale = false;
         this.health.Health = this.health.maxHealth;
         if (this.setup.pmMotor)
         {
             this.setup.pmMotor.SendEvent("toStop");
         }
         this.setup.pmCombat.FsmVariables.GetFsmBool("inCaveBool").Value = false;
         this.animator.SetBool("deathBool", false);
         this.animator.SetBool("onFireBool", false);
         this.animator.SetBool("burning", false);
     }
     else
     {
         if (this.setup.mutantStats)
         {
             this.setup.mutantStats.targetDown = false;
         }
         this.health.Health = this.health.maxHealth;
         this.setup.disableNonActiveFSM("temp");
         if (this.setup.pmSleep)
         {
             this.setup.pmSleep.enabled = true;
             this.setup.pmSleep.FsmVariables.GetFsmBool("getSleepPosBool").Value = true;
             this.setup.pmSleep.FsmVariables.GetFsmBool("inCaveBool").Value      = false;
             this.setup.pmSleep.FsmVariables.GetFsmBool("spawnerInCave").Value   = false;
         }
         this.ai.target = this.setup.currentWaypoint.transform;
         if (this.setup.pmVision)
         {
             this.setup.pmVision.SendEvent("toDisableFSM");
         }
         if (this.setup.pmMotor)
         {
             this.setup.pmMotor.SendEvent("toStop");
         }
         this.animator.enabled = true;
         this.animator.SetBoolReflected("deathfinalBOOL", false);
         this.animator.SetBoolReflected("deathBOOL", false);
         this.animator.SetBoolReflected("trapBool", false);
         this.animator.SetBoolReflected("dropFromTrap", false);
         this.animator.SetBoolReflected("enterTrapBool", false);
         this.setup.pmCombat.FsmVariables.GetFsmBool("deathFinal").Value       = false;
         this.setup.pmBrain.FsmVariables.GetFsmBool("deadBool").Value          = false;
         this.setup.pmCombat.FsmVariables.GetFsmBool("deathBool").Value        = false;
         this.setup.pmCombat.FsmVariables.GetFsmBool("dynamiteMan").Value      = false;
         this.setup.pmBrain.FsmVariables.GetFsmBool("leaderBool").Value        = false;
         this.setup.pmBrain.FsmVariables.GetFsmBool("firemanBool").Value       = false;
         this.setup.pmBrain.FsmVariables.GetFsmBool("paleBool").Value          = false;
         this.setup.pmBrain.FsmVariables.GetFsmBool("eatBodyBool").Value       = false;
         this.setup.pmBrain.FsmVariables.GetFsmBool("enableGravityBool").Value = true;
         this.setup.pmCombat.FsmVariables.GetFsmBool("eatBodyBool").Value      = false;
         this.setup.pmCombat.FsmVariables.GetFsmBool("getFiremanBool").Value   = false;
         this.setup.pmSearch.FsmVariables.GetFsmBool("getFiremanBool").Value   = false;
         this.setup.pmSearch.FsmVariables.GetFsmBool("eatBodyBool").Value      = false;
         this.setup.pmBrain.FsmVariables.GetFsmBool("femaleSkinnyBool").Value  = false;
         this.setup.pmSleep.FsmVariables.GetFsmBool("paleOnCeiling").Value     = false;
         if (this.health)
         {
             this.health.removeAllFeedingEffect();
         }
         this.setup.ai.fireman          = false;
         this.setup.ai.leader           = false;
         this.setup.ai.fireman_dynamite = false;
         this.setup.ai.pale             = false;
         this.setup.ai.femaleSkinny     = false;
         this.setup.ai.maleSkinny       = false;
         this.animator.SetBoolReflected("paleMutantBool", false);
         this.animator.SetBoolReflected("skinnyBool", false);
         this.animator.SetFloatReflected("mutantType", 0f);
         this.props.resetProps();
         if (this.setup.pmBrain)
         {
             this.setup.pmBrain.FsmVariables.GetFsmGameObject("spawnGo").Value = null;
         }
         this.setup.spawnGo = null;
         base.transform.GetChild(0).localScale = new Vector3(1.1f, 1.1f, 1.1f);
         if (this.setup.pmBrain)
         {
             this.setup.pmBrain.FsmVariables.GetFsmGameObject("leaderGo").Value = null;
         }
         if (this.followSetup)
         {
             this.followSetup.followersList.Clear();
         }
     }
 }