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"); }
private void doAwake() { if (this.disableAiForDebug) { this.disableForDebug(); } this.allFSM = base.gameObject.GetComponents<PlayMakerFSM>(); PlayMakerFSM[] array = this.allFSM; for (int i = 0; i < array.Length; i++) { PlayMakerFSM playMakerFSM = array[i]; if (playMakerFSM.FsmName == "action_combatFSM") { this.pmCombat = playMakerFSM; this.actionFSM.Add(playMakerFSM); } if (playMakerFSM.FsmName == "action_inTreeFSM") { this.pmTree = playMakerFSM; this.actionFSM.Add(playMakerFSM); } if (playMakerFSM.FsmName == "global_visionFSM") { this.pmVision = playMakerFSM; } if (playMakerFSM.FsmName == "action_searchFSM") { this.pmSearch = playMakerFSM; this.actionFSM.Add(playMakerFSM); } if (playMakerFSM.FsmName == "action_stalkingFSM") { this.pmStalk = playMakerFSM; this.actionFSM.Add(playMakerFSM); } if (playMakerFSM.FsmName == "global_motorFSM") { this.pmMotor = playMakerFSM; } if (playMakerFSM.FsmName == "action_sleepingFSM") { this.pmSleep = playMakerFSM; this.actionFSM.Add(playMakerFSM); } if (playMakerFSM.FsmName == "global_brainFSM") { this.pmBrain = playMakerFSM; } if (playMakerFSM.FsmName == "global_alertManagerFSM") { this.pmAlert = playMakerFSM; } if (playMakerFSM.FsmName == "action_encounterFSM") { this.pmEncounter = playMakerFSM; this.actionFSM.Add(playMakerFSM); } if (playMakerFSM.FsmName == "global_targetManagerFSM") { this.pmTargetManager = playMakerFSM; } } this.thisGo = base.gameObject; this.rootTr = base.transform.root.transform; this.rotateTr = base.transform; this.familyFunctions = base.transform.parent.GetComponent<mutantFamilyFunctions>(); this.animator = base.GetComponent<Animator>(); this.ai = base.GetComponent<mutantAI>(); this.aiManager = base.GetComponent<mutantAiManager>(); this.typeSetup = base.transform.parent.GetComponent<mutantTypeSetup>(); this.health = base.GetComponent<EnemyHealth>(); this.dayCycle = base.GetComponentInChildren<mutantDayCycle>(); this.enemyEvents = base.transform.GetComponent<enemyAnimEvents>(); this.controller = base.transform.root.GetComponent<CharacterController>(); this.hashs = base.transform.GetComponent<mutantMaleHashId>(); this.propManager = base.transform.GetComponent<mutantPropManager>(); this.bodyVariation = base.transform.GetComponentInChildren<setupBodyVariation>(); this.collisionDetect = base.transform.GetComponentInChildren<mutantCollisionDetect>(); this.hitReceiver = base.transform.GetComponentInChildren<mutantHitReceiver>(); this.animControl = base.transform.GetComponentInChildren<mutantAnimatorControl>(); if (!this.disableAiForDebug) { this.sceneInfo = Scene.SceneTracker; } this.search = base.GetComponent<mutantSearchFunctions>(); this.worldSearch = base.transform.parent.GetComponent<mutantWorldSearchFunctions>(); this.mutantStats = base.transform.parent.GetComponent<targetStats>(); Transform[] componentsInChildren = base.transform.parent.GetComponentsInChildren<Transform>(); Transform[] array2 = componentsInChildren; for (int j = 0; j < array2.Length; j++) { Transform transform = array2[j]; if (transform.name == "char_Head") { this.headJoint = transform.gameObject; } if (transform.name == "char_LeftHandWeapon") { this.charLeftWeaponGo = transform.gameObject; } if (transform.name == "currentWaypoint") { this.currentWaypoint = transform.gameObject; } if (transform.name == "lastPlayerSighting") { this.lastSighting = transform.gameObject; } if (transform.name == "tempLookat") { this.lookatTr = transform; } if (transform.name == "char_club_mesh1") { this.weapon = transform.gameObject; } if (transform.name == "FireStick") { this.fireWeapon = transform.gameObject; } if (transform.name == "char_RightHand") { this.clawsWeapon = transform.gameObject; } if (transform.name == "weaponLeftGO") { this.leftWeapon = transform.gameObject; } if (transform.name == "weaponLeftGO1") { this.leftWeapon1 = transform.gameObject; } if (transform.name == "weaponRightGO") { this.rightWeapon = transform.gameObject; } if (transform.name == "mainHitTrigger") { this.mainWeapon = transform.gameObject; } if (transform.name == "fireBomb") { this.fireBombGo = transform.gameObject; } if (transform.name == "dragPointGo") { this.familyFunctions.dragPoint = transform.gameObject; } if (transform.name == "bodyCollision") { if (this.pmCombat) { this.pmCombat.FsmVariables.GetFsmGameObject("bodyCollisionGo").Value = transform.gameObject; } this.bodyCollisionCollider = transform.GetComponent<CapsuleCollider>(); } if (transform.name == "char_LeftFoot") { this.leftFoot = transform; } if (transform.name == "headCollision") { this.headColliderGo = transform.gameObject; } } }
private void doAwake() { if (this.disableAiForDebug) { this.disableForDebug(); } this.allFSM = base.gameObject.GetComponents <PlayMakerFSM>(); PlayMakerFSM[] array = this.allFSM; for (int i = 0; i < array.Length; i++) { PlayMakerFSM playMakerFSM = array[i]; if (playMakerFSM.FsmName == "action_combatFSM") { this.pmCombat = playMakerFSM; this.actionFSM.Add(playMakerFSM); } if (playMakerFSM.FsmName == "action_inTreeFSM") { this.pmTree = playMakerFSM; this.actionFSM.Add(playMakerFSM); } if (playMakerFSM.FsmName == "global_visionFSM") { this.pmVision = playMakerFSM; } if (playMakerFSM.FsmName == "action_searchFSM") { this.pmSearch = playMakerFSM; this.actionFSM.Add(playMakerFSM); } if (playMakerFSM.FsmName == "action_stalkingFSM") { this.pmStalk = playMakerFSM; this.actionFSM.Add(playMakerFSM); } if (playMakerFSM.FsmName == "global_motorFSM") { this.pmMotor = playMakerFSM; } if (playMakerFSM.FsmName == "action_sleepingFSM") { this.pmSleep = playMakerFSM; this.actionFSM.Add(playMakerFSM); } if (playMakerFSM.FsmName == "global_brainFSM") { this.pmBrain = playMakerFSM; } if (playMakerFSM.FsmName == "global_alertManagerFSM") { this.pmAlert = playMakerFSM; } if (playMakerFSM.FsmName == "action_encounterFSM") { this.pmEncounter = playMakerFSM; this.actionFSM.Add(playMakerFSM); } if (playMakerFSM.FsmName == "global_targetManagerFSM") { this.pmTargetManager = playMakerFSM; } } this.thisGo = base.gameObject; this.rootTr = base.transform.root.transform; this.rotateTr = base.transform; this.familyFunctions = base.transform.parent.GetComponent <mutantFamilyFunctions>(); this.animator = base.GetComponent <Animator>(); this.ai = base.GetComponent <mutantAI>(); this.aiManager = base.GetComponent <mutantAiManager>(); this.typeSetup = base.transform.parent.GetComponent <mutantTypeSetup>(); this.health = base.GetComponent <EnemyHealth>(); this.dayCycle = base.GetComponentInChildren <mutantDayCycle>(); this.enemyEvents = base.transform.GetComponent <enemyAnimEvents>(); this.controller = base.transform.root.GetComponent <CharacterController>(); this.hashs = base.transform.GetComponent <mutantMaleHashId>(); this.propManager = base.transform.GetComponent <mutantPropManager>(); this.bodyVariation = base.transform.GetComponentInChildren <setupBodyVariation>(); this.collisionDetect = base.transform.GetComponentInChildren <mutantCollisionDetect>(); this.hitReceiver = base.transform.GetComponentInChildren <mutantHitReceiver>(); this.animControl = base.transform.GetComponentInChildren <mutantAnimatorControl>(); if (!this.disableAiForDebug) { this.sceneInfo = Scene.SceneTracker; } this.search = base.GetComponent <mutantSearchFunctions>(); this.worldSearch = base.transform.parent.GetComponent <mutantWorldSearchFunctions>(); this.mutantStats = base.transform.parent.GetComponent <targetStats>(); Transform[] componentsInChildren = base.transform.parent.GetComponentsInChildren <Transform>(); Transform[] array2 = componentsInChildren; for (int j = 0; j < array2.Length; j++) { Transform transform = array2[j]; if (transform.name == "char_Head") { this.headJoint = transform.gameObject; } if (transform.name == "char_LeftHandWeapon") { this.charLeftWeaponGo = transform.gameObject; } if (transform.name == "currentWaypoint") { this.currentWaypoint = transform.gameObject; } if (transform.name == "lastPlayerSighting") { this.lastSighting = transform.gameObject; } if (transform.name == "tempLookat") { this.lookatTr = transform; } if (transform.name == "char_club_mesh1") { this.weapon = transform.gameObject; } if (transform.name == "FireStick") { this.fireWeapon = transform.gameObject; } if (transform.name == "char_RightHand") { this.clawsWeapon = transform.gameObject; } if (transform.name == "weaponLeftGO") { this.leftWeapon = transform.gameObject; } if (transform.name == "weaponLeftGO1") { this.leftWeapon1 = transform.gameObject; } if (transform.name == "weaponRightGO") { this.rightWeapon = transform.gameObject; } if (transform.name == "mainHitTrigger") { this.mainWeapon = transform.gameObject; } if (transform.name == "fireBomb") { this.fireBombGo = transform.gameObject; } if (transform.name == "dragPointGo") { this.familyFunctions.dragPoint = transform.gameObject; } if (transform.name == "bodyCollision") { if (this.pmCombat) { this.pmCombat.FsmVariables.GetFsmGameObject("bodyCollisionGo").Value = transform.gameObject; } this.bodyCollisionCollider = transform.GetComponent <CapsuleCollider>(); } if (transform.name == "char_LeftFoot") { this.leftFoot = transform; } if (transform.name == "headCollision") { this.headColliderGo = transform.gameObject; } } }