示例#1
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();
 }
示例#2
0
 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;
         }
     }
 }
示例#3
0
 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;
         }
     }
 }
示例#4
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();
 }