Exemple #1
0
 private void doAwake()
 {
     this.enemyHitMask = 36841472;
     this.rootTr       = base.transform.root;
     if (!this.netPrefab)
     {
         this.setup = base.transform.root.GetComponentInChildren <mutantScriptSetup>();
         this.ai    = base.transform.root.GetComponentInChildren <mutantAI>();
     }
     if (this.netPrefab)
     {
         this.ai_net = base.transform.root.GetComponentInChildren <mutantAI_net>();
     }
     this.animator  = base.transform.root.GetComponentInChildren <Animator>();
     this.events    = base.transform.root.GetComponentInChildren <enemyAnimEvents>();
     this.blockHash = Animator.StringToHash("block");
     FMODCommon.PreloadEvents(new string[]
     {
         this.weaponHitEvent,
         this.parryEvent,
         this.blockEvent,
         this.shellBlockEvent
     });
     this.hasPreloaded = true;
 }
 private void Start()
 {
     this.animator       = base.GetComponentInChildren <Animator>();
     this.setup          = base.GetComponentInChildren <mutantScriptSetup>();
     this.worldFunctions = base.GetComponentInChildren <mutantWorldSearchFunctions>();
     this.fsmDeathBool   = this.setup.pmCombat.FsmVariables.GetFsmBool("deathBool");
 }
 private void Start()
 {
     this.animControl = base.transform.GetComponentInChildren<creepyAnimatorControl>();
     this.setup = base.transform.GetComponentInChildren<mutantScriptSetup>();
     this.animator = base.transform.GetComponentInChildren<Animator>();
     this.events = base.transform.GetComponentInChildren<enemyAnimEvents>();
 }
 private void doAwake()
 {
     this.enemyHitMask = 36841472;
     this.rootTr = base.transform.root;
     if (!this.netPrefab)
     {
         this.setup = base.transform.root.GetComponentInChildren<mutantScriptSetup>();
         this.ai = base.transform.root.GetComponentInChildren<mutantAI>();
     }
     if (this.netPrefab)
     {
         this.ai_net = base.transform.root.GetComponentInChildren<mutantAI_net>();
     }
     this.animator = base.transform.root.GetComponentInChildren<Animator>();
     this.events = base.transform.root.GetComponentInChildren<enemyAnimEvents>();
     this.blockHash = Animator.StringToHash("block");
     FMODCommon.PreloadEvents(new string[]
     {
         this.weaponHitEvent,
         this.parryEvent,
         this.blockEvent,
         this.shellBlockEvent
     });
     this.hasPreloaded = true;
 }
Exemple #5
0
 private void doStart()
 {
     this.feetAudio     = base.transform.FindChild("feetAudioGo").gameObject;
     this.waterDetect   = base.transform.parent.GetComponent <mutantWaterDetect>();
     this.animator      = base.gameObject.GetComponent <Animator>();
     this.setup         = base.GetComponent <mutantScriptSetup>();
     this.ai            = base.GetComponent <mutantAI>();
     this.ai_net        = base.GetComponent <mutantAI_net>();
     this.followers     = base.transform.root.GetComponent <mutantFollowerFunctions>();
     this.oneshotEvents = new List <FMODCommon.OneshotEventInfo>();
     this.loopingEvents = new List <FMODCommon.LoopingEventInfo>();
     base.InvokeRepeating("cleanupOneshotEvents", 1f, 1f);
     this.idleTimeoutEnd = 0f;
     this.idleStateHash  = Animator.StringToHash("Base Layer.idle01");
     this.inIdleState    = false;
     if (this.Remote)
     {
         return;
     }
     if (!this.eventPosition)
     {
         this.eventPosition = base.gameObject;
     }
     if (this.parryChecker)
     {
         this.parryChecker.SetActive(false);
     }
     this.actor = UnityEngine.Random.Range(0, 2);
     this.mainWeaponCollider = this.setup.mainWeapon.GetComponent <BoxCollider>();
     this.defaultWeaponRange = this.mainWeaponCollider.size.z;
     this.defaultWeaponPos   = this.mainWeaponCollider.center.z;
 }
 public override void OnEvent(SetTrappedEnemy evnt)
 {
     if (!this.ValidateSender(evnt, SenderTypes.Any))
     {
         return;
     }
     if (evnt.Enemy != null && evnt.Trap != null)
     {
         mutantScriptSetup componentInChildren = evnt.Enemy.gameObject.transform.root.GetComponentInChildren <mutantScriptSetup>();
         if (componentInChildren)
         {
             trapTrigger componentInChildren2 = evnt.Trap.GetComponentInChildren <trapTrigger>();
             if (componentInChildren2)
             {
                 componentInChildren2.SetNooseRope(componentInChildren);
             }
         }
         else
         {
             CoopMutantDummy componentInChildren3 = evnt.Enemy.gameObject.transform.root.GetComponentInChildren <CoopMutantDummy>();
             if (componentInChildren3)
             {
                 trapTrigger componentInChildren4 = evnt.Trap.GetComponentInChildren <trapTrigger>();
                 if (componentInChildren4)
                 {
                     componentInChildren4.SetNooseRope(componentInChildren3);
                 }
             }
         }
     }
 }
 private void doStart()
 {
     this.setup      = base.GetComponent <mutantScriptSetup>();
     this.animator   = base.GetComponent <Animator>();
     this.controller = base.transform.parent.GetComponent <CharacterController>();
     this.thisTr     = base.transform;
     this.rootTr     = base.transform.parent;
     this.ai         = base.GetComponent <mutantAI>();
     this.walkHash   = Animator.StringToHash("walk");
     this.idleHash   = Animator.StringToHash("idle");
     this.attackHash = Animator.StringToHash("attack");
     this.chargeHash = Animator.StringToHash("charge");
     if (!this.setup.ai.creepy_fat)
     {
         this.fsmMoving = this.setup.pmMotor.FsmVariables.GetFsmBool("movingBool");
     }
     this.fsmInCaveBool = this.setup.pmCombat.FsmVariables.GetFsmBool("inCaveBool");
     if (this.setup.pmCombat)
     {
         this.fsmAttackingStructure = this.setup.pmCombat.FsmVariables.GetFsmBool("attackStructure");
     }
     this.checkWallDelay = Time.time + 5f;
     this.layer          = 26;
     this.layerMask      = 1 << this.layer;
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashIdle").Value   = Animator.StringToHash("idle");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashWalk").Value   = Animator.StringToHash("walk");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashAttack").Value = Animator.StringToHash("attack");
     this.enableAnim = true;
 }
Exemple #8
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("soundAlert") && !this.soundCoolDown)
     {
         if (!this.setup)
         {
             this.setup = base.transform.root.GetComponentInChildren <mutantScriptSetup>();
         }
         soundAlertType component = other.GetComponent <soundAlertType>();
         if (component && component.distraction)
         {
             if (this.distractionCoolDown)
             {
                 return;
             }
             this.distractionCoolDown = true;
             base.Invoke("resetDistractionCoolDown", 60f);
         }
         if (this.setup && this.setup.lastSighting)
         {
             this.setup.lastSighting.transform.position = other.transform.position;
         }
         if (this.setup.pmSearch && this.setup.pmSearch.enabled)
         {
             this.setup.pmSearch.SendEvent("toPlayerNoise");
         }
         if (this.setup.pmCombat)
         {
             if (this.setup.ai.creepy_fat)
             {
                 if (!this.setup.animator.GetBool("charge"))
                 {
                     this.setup.pmCombat.SendEvent("toPlayerNoise");
                 }
             }
             else if (this.setup.pmCombat.enabled)
             {
                 this.setup.pmCombat.SendEvent("toPlayerNoise");
             }
         }
         if (this.setup.pmSleep)
         {
             this.setup.pmSleep.SendEvent("toNoise");
         }
         if (this.setup.pmAlert)
         {
             this.setup.pmAlert.SendEvent("toNoise");
         }
         if (this.setup.pmEncounter)
         {
             this.setup.pmEncounter.SendEvent("toNoise");
         }
         if (!this.soundCoolDown)
         {
             base.Invoke("resetCoolDown", 5f);
         }
         this.currSoundCollider = other;
         this.soundCoolDown     = true;
     }
 }
Exemple #9
0
 private void Awake()
 {
     this.bloodPropertyBlock = new MaterialPropertyBlock();
     this.skinRenderer       = this.MyBody.GetComponent <SkinnedMeshRenderer>();
     this.ai    = base.GetComponent <mutantAI>();
     this.setup = base.GetComponent <mutantScriptSetup>();
     if (this.MyBodyParts.Length > 0)
     {
         this.bodyParentGo = this.MyBodyParts[0].transform.parent.gameObject;
     }
     if (this.MySkinnyParts.Length > 0)
     {
         this.skinnyParentGo = this.MySkinnyParts[0].transform.parent.gameObject;
     }
     if (!this.female)
     {
         this.MaterialLookup.Add(this.FireManMat.name, this.FireManMat);
         this.MaterialLookup.Add(this.DynamiteMat.name, this.DynamiteMat);
         this.MaterialLookup.Add(this.paleMat.name, this.paleMat);
         this.MaterialLookup.Add(this.cannibalMat.name, this.cannibalMat);
         this.MaterialLookup.Add(this.skinnyMat.name, this.skinnyMat);
         Material[] array = this.material;
         for (int i = 0; i < array.Length; i++)
         {
             Material material = array[i];
             if (!this.MaterialLookup.ContainsKey(material.name))
             {
                 this.MaterialLookup.Add(material.name, material);
             }
         }
     }
 }
 private void Start()
 {
     this.animControl = base.transform.GetComponentInChildren <creepyAnimatorControl>();
     this.setup       = base.transform.GetComponentInChildren <mutantScriptSetup>();
     this.animator    = base.transform.GetComponentInChildren <Animator>();
     this.events      = base.transform.GetComponentInChildren <enemyAnimEvents>();
 }
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("soundAlert") && !this.soundCoolDown)
     {
         if (!this.setup)
         {
             this.setup = base.transform.root.GetComponentInChildren<mutantScriptSetup>();
         }
         soundAlertType component = other.GetComponent<soundAlertType>();
         if (component && component.distraction)
         {
             if (this.distractionCoolDown)
             {
                 return;
             }
             this.distractionCoolDown = true;
             base.Invoke("resetDistractionCoolDown", 60f);
         }
         if (this.setup && this.setup.lastSighting)
         {
             this.setup.lastSighting.transform.position = other.transform.position;
         }
         if (this.setup.pmSearch && this.setup.pmSearch.enabled)
         {
             this.setup.pmSearch.SendEvent("toPlayerNoise");
         }
         if (this.setup.pmCombat)
         {
             if (this.setup.ai.creepy_fat)
             {
                 if (!this.setup.animator.GetBool("charge"))
                 {
                     this.setup.pmCombat.SendEvent("toPlayerNoise");
                 }
             }
             else if (this.setup.pmCombat.enabled)
             {
                 this.setup.pmCombat.SendEvent("toPlayerNoise");
             }
         }
         if (this.setup.pmSleep)
         {
             this.setup.pmSleep.SendEvent("toNoise");
         }
         if (this.setup.pmAlert)
         {
             this.setup.pmAlert.SendEvent("toNoise");
         }
         if (this.setup.pmEncounter)
         {
             this.setup.pmEncounter.SendEvent("toNoise");
         }
         if (!this.soundCoolDown)
         {
             base.Invoke("resetCoolDown", 5f);
         }
         this.currSoundCollider = other;
         this.soundCoolDown = true;
     }
 }
 private void Awake()
 {
     this.setup       = base.transform.root.GetComponentInChildren <mutantScriptSetup>();
     this.rootTr      = base.transform.root.GetChild(0).transform;
     this.animator    = base.transform.root.GetComponentInChildren <Animator>();
     this.hitCollider = base.GetComponent <Collider>();
 }
Exemple #13
0
 private void doStart()
 {
     this.ragDollSetup = base.transform.GetComponent <clsragdollify>();
     this.animator     = base.gameObject.GetComponent <Animator>();
     this.setup        = base.transform.GetComponent <mutantScriptSetup>();
     Transform[] componentsInChildren = base.transform.root.GetComponentsInChildren <Transform>();
     Transform[] array = componentsInChildren;
     for (int i = 0; i < array.Length; i++)
     {
         Transform transform = array[i];
         if (transform.name == "weaponLeftGO")
         {
             this.weaponLeft = transform.gameObject;
         }
         if (transform.name == "weaponLeftGO1")
         {
             this.weaponLeft1 = transform.gameObject;
         }
         if (transform.name == "weaponRightGO")
         {
             this.weaponRight = transform.gameObject;
         }
         if (transform.name == "weaponGO")
         {
             this.weaponMain         = transform.gameObject;
             this.weaponMainCollider = transform.GetComponent <Collider>();
         }
     }
 }
 private void Awake()
 {
     this.sceneInfo       = Scene.SceneTracker;
     this.setup           = base.GetComponent <mutantScriptSetup>();
     this.ai              = base.GetComponent <mutantAI>();
     this.searchFunctions = base.GetComponent <mutantSearchFunctions>();
     this.tr              = base.transform;
 }
Exemple #15
0
 public static void Scream()
 {
     foreach (GameObject obj in Scene.MutantControler.activeWorldCannibals)
     {
         mutantScriptSetup mutantScript = obj.GetComponentInChildren <mutantScriptSetup>();
         mutantScript.search.SendMessage("resetScreamCooldown");
         mutantScript.search.playSearchScream();
     }
 }
Exemple #16
0
 private void Start()
 {
     this.skin  = base.transform.GetComponent <SkinnedMeshRenderer>();
     this.setup = base.transform.parent.GetComponent <mutantScriptSetup>();
     if (this.swapMeshOnly)
     {
         this.doSwapMesh();
     }
 }
Exemple #17
0
 private void Start()
 {
     this.setup       = base.transform.root.GetComponentInChildren <mutantScriptSetup>();
     this.animControl = base.transform.root.GetComponentInChildren <mutantAnimatorControl>();
     this.animator    = this.animControl.transform.GetComponent <Animator>();
     this.rootTr      = base.transform.root;
     this.treeBool    = this.setup.pmCombat.FsmVariables.GetFsmBool("inTreeBool");
     base.Invoke("setStartUp", 1f);
 }
 private void Awake()
 {
     this.setup      = base.GetComponent <mutantScriptSetup>();
     this.events     = base.GetComponent <creepyAnimEvents>();
     this.animator   = base.GetComponent <Animator>();
     this.controller = base.transform.parent.GetComponent <CharacterController>();
     this.thisTr     = base.transform;
     this.rootTr     = base.transform.parent;
     this.ai         = base.GetComponent <mutantAI>();
 }
Exemple #19
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>();
 }
Exemple #20
0
        public static void Found()
        {
            foreach (GameObject obj in Scene.MutantControler.activeWorldCannibals)
            {
                mutantScriptSetup mutantScript = obj.GetComponentInChildren <mutantScriptSetup>();

                if (mutantScript == null || mutantScript.search == null || mutantScript.pmCombatScript == null || mutantScript.targetFunctions == null || mutantScript.dayCycle == null || mutantScript.aiManager == null)
                {
                    continue;
                }

                mutantScript.lastSighting.transform.position = localPlayer.transform.position;
                mutantScript.search.StartCoroutine(mutantScript.search.findPerpToEnemy(1));
                mutantScript.search.setToWaypoint();
                mutantScript.search.setToPlayer();

                mutantScript.familyFunctions.sendTargetSpotted();

                mutantScript.targetFunctions.defaultVisionRange = 200;
                mutantScript.targetFunctions.threatRemoveDist   = 200f;
                mutantScript.targetFunctions.sendAddAttacker();

                if ((bool)mutantScript.followerFunctions)
                {
                    mutantScript.followerFunctions.sendAttackEvent();
                }
            }

            foreach (GameObject obj in Scene.MutantControler.allCreepySpawns)
            {
                mutantScriptSetup mutantScript = obj.GetComponentInChildren <mutantScriptSetup>();

                if (mutantScript == null || mutantScript.search == null || mutantScript.pmCombatScript == null || mutantScript.targetFunctions == null || mutantScript.dayCycle == null || mutantScript.aiManager == null)
                {
                    continue;
                }

                mutantScript.lastSighting.transform.position = localPlayer.transform.position;
                //mutantScript.search.currentTarget = localPlayer;
                mutantScript.search.StartCoroutine(mutantScript.search.findPerpToEnemy(1));
                mutantScript.search.setToWaypoint();

                mutantScript.search.setToPlayer();

                mutantScript.targetFunctions.defaultVisionRange = 400;
                mutantScript.targetFunctions.threatRemoveDist   = 400f;
                mutantScript.targetFunctions.sendAddAttacker();

                if ((bool)mutantScript.followerFunctions)
                {
                    mutantScript.followerFunctions.sendAttackEvent();
                }
            }
        }
Exemple #21
0
 private void Start()
 {
     this.thisTr   = base.transform;
     this.animator = base.transform.GetComponent <Animator>();
     if (this.mainRendererGo)
     {
         this.thisRenderer = this.mainRendererGo.GetComponent <SkinnedMeshRenderer>();
     }
     if (this.lowSkinnyGo)
     {
         this.thisSkinnyRenderer = this.lowSkinnyGo.GetComponent <SkinnedMeshRenderer>();
     }
     if (this.lowRendererGo)
     {
         this.thisLowRenderer = this.lowRendererGo.GetComponent <SkinnedMeshRenderer>();
     }
     if (this.lowSkinnyGo)
     {
         this.thisLowSkinnyRenderer = this.lowSkinnyGo.GetComponent <SkinnedMeshRenderer>();
     }
     this.rootGo = base.transform.root.gameObject;
     if (!this.netPrefab)
     {
         this.setup   = base.transform.GetComponent <mutantScriptSetup>();
         this.fsmDist = this.setup.pmCombat.FsmVariables.GetFsmFloat("playerDist");
         if (this.setup.pmSleep)
         {
             this.setup.pmSleep.FsmVariables.GetFsmGameObject("meshGo").Value = base.gameObject;
         }
         if (this.setup.pmEncounter)
         {
             this.fsmDoingEncounter = this.setup.pmEncounter.FsmVariables.GetFsmBool("doingEncounter");
         }
         if (this.setup.pmBrain)
         {
             this.fsmSleepBool = this.setup.pmBrain.FsmVariables.GetFsmBool("sleepBool");
         }
         else if (this.setup.pmCombat)
         {
             this.fsmSleepBool = this.setup.pmCombat.FsmVariables.GetFsmBool("sleepBool");
         }
         if (this.setup.pmCombat)
         {
             this.fsmAnimatorActive = this.setup.pmCombat.FsmVariables.GetFsmBool("animatorActive");
         }
     }
     base.Invoke("getAmplifyObj", 0.1f);
     if (this.netPrefab)
     {
         base.InvokeRepeating("updatePlayerTargets", 1f, 1f);
     }
     this.initBool = false;
     base.Invoke("initMe", 4f);
 }
        //Returns clinet progression for Singleplayer
        public static ClinetEnemyProgression GetCP(Transform tr)
        {
            if (spProgression.ContainsKey(tr.root))
            {
                ClinetEnemyProgression cp = spProgression[tr.root];
                if (Time.time <= cp.creationTime + ClinetEnemyProgression.LifeTime)
                {
                    return(cp);
                }
                else
                {
                    spProgression.Remove(tr.root);
                }
            }
            else
            {
                EnemyProgression p = tr.root.GetComponent <EnemyProgression>();
                if (p == null)
                {
                    p = tr.root.GetComponentInChildren <EnemyProgression>();
                }

                if (p != null)
                {
                    ClinetEnemyProgression cpr = new ClinetEnemyProgression(tr.root);
                    spProgression.Add(tr.root, cpr);
                    return(cpr);
                }
                else
                {
                    {
                        mutantScriptSetup setup = tr.root.GetComponentInChildren <mutantScriptSetup>();
                        if (setup == null)
                        {
                            setup = tr.root.GetComponent <mutantScriptSetup>();
                        }
                        if (setup != null)
                        {
                            p = setup.health.gameObject.AddComponent <EnemyProgression>();
                            if (p != null)
                            {
                                p._Health = setup.health;
                                p._AI     = setup.ai;
                                p.entity  = setup.GetComponent <BoltEntity>();
                                p.setup   = setup;
                            }
                        }
                    }
                }
            }
            return(null);
        }
 private void Start()
 {
     this.setup      = base.GetComponentInChildren <mutantScriptSetup>();
     this.spawnSetup = base.transform.root.GetComponent <mutantTypeSetup>();
     this.ai         = base.GetComponentInChildren <mutantAI>();
     this.search     = base.GetComponentInChildren <mutantSearchFunctions>();
     this.animator   = base.GetComponentInChildren <Animator>();
     if (this.dragPoint)
     {
         this.dragPointInit = this.dragPoint.transform.localPosition;
     }
     this.mutantControl = Scene.MutantControler;
     this.health        = base.GetComponentInChildren <EnemyHealth>();
     this.fsmDeathBool  = this.setup.pmCombat.FsmVariables.GetFsmBool("deathBool");
 }
 private void Start()
 {
     this.Tr = base.transform;
     if (this.typeHitPlayer)
     {
         this.animator = base.GetComponentInChildren <Animator>();
     }
     else
     {
         this.animator = base.GetComponent <Animator>();
     }
     if (this.randomSpeed)
     {
         this.animator.speed = UnityEngine.Random.Range(0.9f, 1.2f);
     }
     else
     {
         this.animator.speed = this.animatorSpeed;
     }
     if (this.typeCarryTimmy && this.startDelay > 0f)
     {
         base.Invoke("pickupTimmy", this.startDelay);
         base.Invoke("turnAround", this.startDelay + 5f);
     }
     if (this.typeIdleTurnAroundWalkAway)
     {
         this.animator.SetIntegerReflected("startInt1", UnityEngine.Random.Range(0, 2));
         this.animator.SetTriggerReflected("startTrigger");
         this.randDelay = UnityEngine.Random.Range(this.startDelay - 0.5f, this.startDelay + 0.5f);
         if (this.startDelay > 0f)
         {
             base.Invoke("turnAround", this.randDelay);
         }
     }
     if (this.typeBackAwayCareful)
     {
         this.animator.SetIntegerReflected("startInt1", 2);
         this.animator.SetTriggerReflected("startTrigger");
     }
     if (this.typeHitPlayer)
     {
         this.setup = base.transform.GetComponentInChildren <mutantScriptSetup>();
         if (this.startDelay > 0f)
         {
             base.Invoke("runHitPlayer", this.startDelay);
         }
     }
 }
 private void doStart()
 {
     this.setup         = base.GetComponent <mutantScriptSetup>();
     this.animator      = base.GetComponent <Animator>();
     this.controller    = base.transform.parent.GetComponent <CharacterController>();
     this.thisTr        = base.transform;
     this.rootTr        = base.transform.parent;
     this.ai            = base.GetComponent <mutantAI>();
     this.fsmInCaveBool = this.setup.pmCombat.FsmVariables.GetFsmBool("inCaveBool");
     this.layer         = 26;
     this.layerMask     = 1 << this.layer;
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashIdle").Value   = Animator.StringToHash("idle");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashWalk").Value   = Animator.StringToHash("walk");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashAttack").Value = Animator.StringToHash("attack");
     base.Invoke("callChangeIdle", (float)UnityEngine.Random.Range(0, 2));
 }
Exemple #26
0
 private void Awake()
 {
     this.ragDollSetup    = base.GetComponent <clsragdollify>();
     this.setup           = base.GetComponent <mutantScriptSetup>();
     this.typeSetup       = base.transform.parent.GetComponent <mutantTypeSetup>();
     this.ai              = base.GetComponent <mutantAI>();
     this.familyFunctions = base.transform.parent.GetComponent <mutantFamilyFunctions>();
     this.targetSwitcher  = base.GetComponentInChildren <mutantTargetSwitching>();
     if (!this.ai.creepy)
     {
         this.animator = base.GetComponent <Animator>();
     }
     else
     {
         this.animator = base.GetComponentInChildren <Animator>();
     }
     this.MP = base.gameObject.GetComponent <mutantPropManager>();
     this.bloodPropertyBlock = new MaterialPropertyBlock();
 }
Exemple #27
0
 private void Start()
 {
     this.animator         = base.GetComponent <Animator>();
     this.controller       = base.transform.parent.GetComponent <CharacterController>();
     this.events           = base.GetComponent <enemyAnimEvents>();
     this.thisTr           = base.transform;
     this.rootTr           = base.transform.parent;
     this.ai               = base.gameObject.GetComponent <mutantAI>();
     this.setup            = base.GetComponent <mutantScriptSetup>();
     this.hashId           = base.GetComponent <mutantMaleHashId>();
     this.target           = LocalPlayer.Transform;
     this.jumpingHash      = Animator.StringToHash("jumping");
     this.jumpFallHash     = Animator.StringToHash("jumpFall");
     this.inTrapHash       = Animator.StringToHash("inTrap");
     this.runTrapHash      = Animator.StringToHash("runTrap");
     this.controllerRadius = this.controller.radius;
     if (this.setup.pmBrain)
     {
         this.fsmPlayerDist       = this.setup.pmBrain.FsmVariables.GetFsmFloat("playerDist");
         this.fsmDoControllerBool = this.setup.pmBrain.FsmVariables.GetFsmBool("enableControllerBool");
         this.fsmEnableGravity    = this.setup.pmBrain.FsmVariables.GetFsmBool("enableGravityBool");
         this.fsmTargetSeen       = this.setup.pmBrain.FsmVariables.GetFsmBool("targetSeenBool");
     }
     if (this.setup.pmSleep)
     {
         this.fsmInCaveBool = this.setup.pmSleep.FsmVariables.GetFsmBool("inCaveBool");
         this.fsmNoMoveBool = this.setup.pmSleep.FsmVariables.GetFsmBool("noMoveBool");
     }
     if (this.setup.pmCombat)
     {
         this.fsmDeathBool = this.setup.pmCombat.FsmVariables.GetFsmBool("deathBool");
     }
     this.layerMask = 101851136;
     base.Invoke("initAnimator", 0.5f);
     if (BoltNetwork.isRunning)
     {
         this.setup.pmCombat.FsmVariables.GetFsmBool("boltIsActive").Value = true;
     }
     else
     {
         this.setup.pmCombat.FsmVariables.GetFsmBool("boltIsActive").Value = false;
     }
 }
Exemple #28
0
 private void Awake()
 {
     this.animator    = base.transform.GetComponentInChildren <Animator>();
     this.getParams   = base.GetComponent <getAnimatorParams>();
     this.setup       = base.transform.GetComponentInChildren <mutantScriptSetup>();
     this.ai          = base.transform.GetComponentInChildren <mutantAI>();
     this.props       = base.transform.GetComponentInChildren <mutantPropManager>();
     this.propsFemale = base.transform.GetComponentInChildren <setupBodyVariation>();
     this.health      = base.transform.GetComponentInChildren <EnemyHealth>();
     this.followSetup = base.transform.GetComponent <mutantFollowerFunctions>();
     this.dayCycle    = base.transform.GetComponentInChildren <mutantDayCycle>();
     this.controlGo   = Scene.MutantControler.gameObject;
     if (this.controlGo)
     {
         this.mutantControl = Scene.MutantControler;
     }
     this.spawnManager = this.controlGo.GetComponent <mutantSpawnManager>();
     this.stats        = base.transform.GetComponent <targetStats>();
     this.waterLayer   = LayerMask.NameToLayer("Water");
 }
Exemple #29
0
    public static void DrawEnemies()
    {
        if (allESP)
        {
            foreach (GameObject obj in Scene.MutantControler.activeWorldCannibals)
            {
                mutantScriptSetup character = obj.GetComponentInChildren <mutantScriptSetup>();

                if ((boneESP || jointESP) && DistanceToPlayer(obj.transform) < drawDistance)
                {
                    DrawSkeleton(character.animator);
                }


                if (box)
                {
                    Vector3 position = character.transform.position;
                    Vector3 head     = position;
                    head.y += character.controller == null ? 5 : character.controller.height;

                    Vector3 screenPosition = Utils.manualWorldToScreenPoint(position);
                    Vector3 screenHead     = Utils.manualWorldToScreenPoint(head);
                    float   distance       = Utils.Get3dDistance(mainCam.transform.position, position);
                    string  display        = "" + Mathf.Floor(distance) + "m";

                    if (screenPosition != Vector3.zero)
                    {
                        float enemyHeight = screenPosition.y - screenHead.y;
                        float enemyWidth  = enemyHeight / 1.5f;

                        GUI.color = Color.green;
                        DrawBox(screenPosition, enemyWidth, enemyHeight, Color.green);

                        Vector2 ObjSize = GUI.skin.GetStyle("label").CalcSize(new GUIContent(display));
                        GUI.Label(new Rect(screenPosition.x - ObjSize.x / 2 + 1, screenHead.y - 17, 500, 40), display);
                    }
                }
            }
        }
    }
Exemple #30
0
 private void Start()
 {
     this.previousDark = Clock.Dark;
     this.setup        = base.GetComponent <mutantScriptSetup>();
     if (this.setup.ai.creepy || this.setup.ai.creepy_male || this.setup.ai.creepy_baby || this.setup.ai.creepy_fat)
     {
         this.fsmRoamRange   = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmRoamRange");
         this.fsmSearchRange = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmSearchRange");
         this.fsmInCave      = this.setup.pmCombat.FsmVariables.GetFsmBool("inCaveBool");
     }
     else
     {
         this.fsmAggresion  = this.setup.pmBrain.FsmVariables.GetFsmInt("aggression");
         this.fsmFear       = this.setup.pmBrain.FsmVariables.GetFsmInt("fear");
         this.fsmSleep      = this.setup.pmBrain.FsmVariables.GetFsmBool("sleepBool");
         this.fsmCurrentDay = this.setup.pmBrain.FsmVariables.GetFsmInt("currentDay");
         this.fsmDark       = this.setup.pmBrain.FsmVariables.GetFsmBool("dark");
         this.fsmInCave     = this.setup.pmSleep.FsmVariables.GetFsmBool("inCaveBool");
     }
     base.InvokeRepeating("setDayConditions", 1f, 5f);
     base.Invoke("initWakeUp", 5f);
 }
Exemple #31
0
 private void Start()
 {
     this.setup              = base.GetComponent <mutantScriptSetup>();
     this.attackTagFSM       = this.setup.pmCombat.FsmVariables.GetFsmInt("HashAttack");
     this.idleTagFSM         = this.setup.pmCombat.FsmVariables.GetFsmInt("HashIdle");
     this.runTagFSM          = this.setup.pmCombat.FsmVariables.GetFsmInt("HashRun");
     this.fearIdleFSM        = this.setup.pmCombat.FsmVariables.GetFsmInt("HashFearIdle");
     this.onRockFSM          = this.setup.pmCombat.FsmVariables.GetFsmInt("HashOnRock");
     this.attackTagFSM.Value = Animator.StringToHash("attacking");
     this.idleTagFSM.Value   = Animator.StringToHash("idle");
     this.runTagFSM.Value    = Animator.StringToHash("running");
     this.fearIdleFSM.Value  = Animator.StringToHash("fearIdle");
     this.onRockFSM.Value    = Animator.StringToHash("onRock");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashStagger").Value   = Animator.StringToHash("stagger");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashDamaged").Value   = Animator.StringToHash("damaged");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashDeath").Value     = Animator.StringToHash("death");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashLanding").Value   = Animator.StringToHash("landing");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashInTree").Value    = Animator.StringToHash("inTree");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashJumpFall").Value  = Animator.StringToHash("jumpFall");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashInTreeMir").Value = Animator.StringToHash("inTreeMir");
     if (this.setup.pmSearch)
     {
         this.setup.pmSearch.FsmVariables.GetFsmInt("HashOnRock").Value = Animator.StringToHash("onRock");
         this.setup.pmSearch.FsmVariables.GetFsmInt("HashAttack").Value = Animator.StringToHash("attacking");
     }
     if (this.setup.pmEncounter)
     {
         this.setup.pmEncounter.FsmVariables.GetFsmInt("hashRunTrap").Value = Animator.StringToHash("runTrap");
         this.setup.pmEncounter.FsmVariables.GetFsmInt("hashInTrap").Value  = Animator.StringToHash("inTrap");
     }
     this.attackTag = this.attackTagFSM.Value;
     this.idleTag   = this.idleTagFSM.Value;
     this.runTag    = this.runTagFSM.Value;
     this.deathTag  = Animator.StringToHash("death");
     this.onRockTag = this.onRockFSM.Value;
     this.noMoveTag = Animator.StringToHash("noMove");
 }
 private void Start()
 {
     this.setup = base.GetComponent<mutantScriptSetup>();
     this.attackTagFSM = this.setup.pmCombat.FsmVariables.GetFsmInt("HashAttack");
     this.idleTagFSM = this.setup.pmCombat.FsmVariables.GetFsmInt("HashIdle");
     this.runTagFSM = this.setup.pmCombat.FsmVariables.GetFsmInt("HashRun");
     this.fearIdleFSM = this.setup.pmCombat.FsmVariables.GetFsmInt("HashFearIdle");
     this.onRockFSM = this.setup.pmCombat.FsmVariables.GetFsmInt("HashOnRock");
     this.attackTagFSM.Value = Animator.StringToHash("attacking");
     this.idleTagFSM.Value = Animator.StringToHash("idle");
     this.runTagFSM.Value = Animator.StringToHash("running");
     this.fearIdleFSM.Value = Animator.StringToHash("fearIdle");
     this.onRockFSM.Value = Animator.StringToHash("onRock");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashStagger").Value = Animator.StringToHash("stagger");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashDamaged").Value = Animator.StringToHash("damaged");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashDeath").Value = Animator.StringToHash("death");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashLanding").Value = Animator.StringToHash("landing");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashInTree").Value = Animator.StringToHash("inTree");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashJumpFall").Value = Animator.StringToHash("jumpFall");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashInTreeMir").Value = Animator.StringToHash("inTreeMir");
     if (this.setup.pmSearch)
     {
         this.setup.pmSearch.FsmVariables.GetFsmInt("HashOnRock").Value = Animator.StringToHash("onRock");
         this.setup.pmSearch.FsmVariables.GetFsmInt("HashAttack").Value = Animator.StringToHash("attacking");
     }
     if (this.setup.pmEncounter)
     {
         this.setup.pmEncounter.FsmVariables.GetFsmInt("hashRunTrap").Value = Animator.StringToHash("runTrap");
         this.setup.pmEncounter.FsmVariables.GetFsmInt("hashInTrap").Value = Animator.StringToHash("inTrap");
     }
     this.attackTag = this.attackTagFSM.Value;
     this.idleTag = this.idleTagFSM.Value;
     this.runTag = this.runTagFSM.Value;
     this.deathTag = Animator.StringToHash("death");
     this.onRockTag = this.onRockFSM.Value;
     this.noMoveTag = Animator.StringToHash("noMove");
 }
Exemple #33
0
 private void Start()
 {
     this.animator = base.GetComponent <Animator>();
     this.setup    = base.GetComponent <mutantScriptSetup>();
     this.thisTr   = base.transform;
     if (this.setup.pmCombat)
     {
         this.fsmFearBool = this.setup.pmCombat.FsmVariables.GetFsmBool("fearBOOL");
     }
     if (this.setup.pmBrain)
     {
         this.fsmDeadBool = this.setup.pmBrain.FsmVariables.GetFsmBool("deadBool");
     }
     if (this.setup.pmCombat)
     {
         this.fsmDownBool = this.setup.pmCombat.FsmVariables.GetFsmBool("deathBool");
     }
     if (this.setup.pmVision)
     {
         this.fsmLookingForTarget = this.setup.pmVision.FsmVariables.GetFsmBool("lookingForTarget");
     }
     base.InvokeRepeating("sendRemoveAttacker", 1f, 4f);
     base.InvokeRepeating("sendAddVisibleTarget", 1f, 3f);
 }
Exemple #34
0
 private void Start()
 {
     this.setup = base.transform.root.GetComponentInChildren <mutantScriptSetup>();
 }
 private void Start()
 {
     this.setup = base.transform.GetComponentInChildren<mutantScriptSetup>();
     this.tr = this.setup.transform;
 }
 private void Start()
 {
     this.setup = base.GetComponent<mutantScriptSetup>();
     this.mutantHealth = base.GetComponent<EnemyHealth>();
 }
 private void Start()
 {
     this.animator = base.GetComponentInChildren<Animator>();
     this.setup = base.GetComponentInChildren<mutantScriptSetup>();
     this.worldFunctions = base.GetComponentInChildren<mutantWorldSearchFunctions>();
     this.fsmDeathBool = this.setup.pmCombat.FsmVariables.GetFsmBool("deathBool");
 }
 private void Awake()
 {
     this.setup = base.GetComponent<mutantScriptSetup>();
     this.events = base.GetComponent<creepyAnimEvents>();
     this.animator = base.GetComponent<Animator>();
     this.controller = base.transform.parent.GetComponent<CharacterController>();
     this.thisTr = base.transform;
     this.rootTr = base.transform.parent;
     this.ai = base.GetComponent<mutantAI>();
 }
 private void doStart()
 {
     this.setup = base.GetComponent<mutantScriptSetup>();
     this.animator = base.GetComponent<Animator>();
     this.controller = base.transform.parent.GetComponent<CharacterController>();
     this.thisTr = base.transform;
     this.rootTr = base.transform.parent;
     this.ai = base.GetComponent<mutantAI>();
     this.walkHash = Animator.StringToHash("walk");
     this.idleHash = Animator.StringToHash("idle");
     this.attackHash = Animator.StringToHash("attack");
     this.chargeHash = Animator.StringToHash("charge");
     if (!this.setup.ai.creepy_fat)
     {
         this.fsmMoving = this.setup.pmMotor.FsmVariables.GetFsmBool("movingBool");
     }
     this.fsmInCaveBool = this.setup.pmCombat.FsmVariables.GetFsmBool("inCaveBool");
     if (this.setup.pmCombat)
     {
         this.fsmAttackingStructure = this.setup.pmCombat.FsmVariables.GetFsmBool("attackStructure");
     }
     this.checkWallDelay = Time.time + 5f;
     this.layer = 26;
     this.layerMask = 1 << this.layer;
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashIdle").Value = Animator.StringToHash("idle");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashWalk").Value = Animator.StringToHash("walk");
     this.setup.pmCombat.FsmVariables.GetFsmInt("HashAttack").Value = Animator.StringToHash("attack");
     this.enableAnim = true;
 }
 private void Start()
 {
     this.animator = base.GetComponent<Animator>();
     this.controller = base.transform.parent.GetComponent<CharacterController>();
     this.events = base.GetComponent<enemyAnimEvents>();
     this.thisTr = base.transform;
     this.rootTr = base.transform.parent;
     this.ai = base.gameObject.GetComponent<mutantAI>();
     this.setup = base.GetComponent<mutantScriptSetup>();
     this.hashId = base.GetComponent<mutantMaleHashId>();
     this.target = LocalPlayer.Transform;
     this.jumpingHash = Animator.StringToHash("jumping");
     this.jumpFallHash = Animator.StringToHash("jumpFall");
     this.inTrapHash = Animator.StringToHash("inTrap");
     this.runTrapHash = Animator.StringToHash("runTrap");
     this.controllerRadius = this.controller.radius;
     if (this.setup.pmBrain)
     {
         this.fsmPlayerDist = this.setup.pmBrain.FsmVariables.GetFsmFloat("playerDist");
         this.fsmDoControllerBool = this.setup.pmBrain.FsmVariables.GetFsmBool("enableControllerBool");
         this.fsmEnableGravity = this.setup.pmBrain.FsmVariables.GetFsmBool("enableGravityBool");
         this.fsmTargetSeen = this.setup.pmBrain.FsmVariables.GetFsmBool("targetSeenBool");
     }
     if (this.setup.pmSleep)
     {
         this.fsmInCaveBool = this.setup.pmSleep.FsmVariables.GetFsmBool("inCaveBool");
         this.fsmNoMoveBool = this.setup.pmSleep.FsmVariables.GetFsmBool("noMoveBool");
     }
     if (this.setup.pmCombat)
     {
         this.fsmDeathBool = this.setup.pmCombat.FsmVariables.GetFsmBool("deathBool");
     }
     this.layerMask = 101851136;
     base.Invoke("initAnimator", 0.5f);
     if (BoltNetwork.isRunning)
     {
         this.setup.pmCombat.FsmVariables.GetFsmBool("boltIsActive").Value = true;
     }
     else
     {
         this.setup.pmCombat.FsmVariables.GetFsmBool("boltIsActive").Value = false;
     }
 }
Exemple #41
0
 private void Awake()
 {
     this.ragDollSetup = base.GetComponent<clsragdollify>();
     this.setup = base.GetComponent<mutantScriptSetup>();
     this.typeSetup = base.transform.parent.GetComponent<mutantTypeSetup>();
     this.ai = base.GetComponent<mutantAI>();
     this.familyFunctions = base.transform.parent.GetComponent<mutantFamilyFunctions>();
     this.targetSwitcher = base.GetComponentInChildren<mutantTargetSwitching>();
     if (!this.ai.creepy)
     {
         this.animator = base.GetComponent<Animator>();
     }
     else
     {
         this.animator = base.GetComponentInChildren<Animator>();
     }
     this.MP = base.gameObject.GetComponent<mutantPropManager>();
     this.bloodPropertyBlock = new MaterialPropertyBlock();
 }
 private void Start()
 {
     this.setup = base.transform.root.GetComponentInChildren<mutantScriptSetup>();
     base.Invoke("resetCoolDown", 1f);
 }
 private void Start()
 {
     this.controller = base.GetComponent<CharacterController>();
     this.setup = base.transform.GetComponentInChildren<mutantScriptSetup>();
     this.orientTr = this.setup.thisGo.transform;
 }
 private void doStart()
 {
     this.ragDollSetup = base.transform.GetComponent<clsragdollify>();
     this.animator = base.gameObject.GetComponent<Animator>();
     this.setup = base.transform.GetComponent<mutantScriptSetup>();
     Transform[] componentsInChildren = base.transform.root.GetComponentsInChildren<Transform>();
     Transform[] array = componentsInChildren;
     for (int i = 0; i < array.Length; i++)
     {
         Transform transform = array[i];
         if (transform.name == "weaponLeftGO")
         {
             this.weaponLeft = transform.gameObject;
         }
         if (transform.name == "weaponLeftGO1")
         {
             this.weaponLeft1 = transform.gameObject;
         }
         if (transform.name == "weaponRightGO")
         {
             this.weaponRight = transform.gameObject;
         }
         if (transform.name == "weaponGO")
         {
             this.weaponMain = transform.gameObject;
             this.weaponMainCollider = transform.GetComponent<Collider>();
         }
     }
 }