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;
 }
 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");
 }
示例#3
0
 private void Start()
 {
     this.setup                            = base.transform.GetComponent <mutantScriptSetup>();
     this.ai                               = base.GetComponent <mutantAI>();
     this.searchFunctions                  = base.GetComponent <mutantSearchFunctions>();
     this.animator                         = base.transform.GetComponent <Animator>();
     this.fsmRunAwayAfterAttack            = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmRunAwayAfterAttack");
     this.fsmfollowUpAfterAttack           = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmFollowUpAfterAttack");
     this.fsmClimbTreeAfterAttack          = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmClimbTreeAfterAttack");
     this.fsmRunHideAfterAttack            = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmRunHideAfterAttack");
     this.fsmToStalkAfterAttack            = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmToStalkAfterAttack");
     this.fsmRunTowardsFlank               = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmRunTowardsFlank");
     this.fsmRunTowardsScream              = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmRunTowardsScream");
     this.fsmRunTowardsAttack              = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmRunTowardsAttack");
     this.fsmScreamRunTowards              = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmScreamRunTowards");
     this.fsmLeaderCallFollowers           = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmLeaderCallFollowers");
     this.fsmAttack                        = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmAttack");
     this.fsmStepLeft                      = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmStepLeft");
     this.fsmStepRight                     = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmStepRight");
     this.fsmScream                        = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmScream");
     this.fsmTreeAttack                    = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmTreeAttack");
     this.fsmTreeClimb                     = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmTreeClimb");
     this.fsmBackAway                      = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmBackAway");
     this.fsmDisengage                     = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmDisengage");
     this.fsmAwayReturn                    = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmAwayReturn");
     this.fsmAwayScream                    = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmAwayScream");
     this.fsmAwayFlank                     = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmAwayFlank");
     this.fsmAwayToRock                    = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmAwayToRock");
     this.fsmAwayToBurn                    = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmAwayToBurn");
     this.fsmToStructure                   = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmToStructure");
     this.fsmRunAwayDist                   = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmRunAwayDist");
     this.fsmRunForwardStopDist            = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmRunForwardStopDist");
     this.fsmRunTowardPlayerDist           = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmRunTowardPlayerDist");
     this.fsmAttackChance                  = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmAttackChance");
     this.fsmRunAwayChance                 = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmRunAwayChance");
     this.fsmSneakForward                  = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmSneakForward");
     this.fsmSneakBack                     = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmSneakBack");
     this.fsmRunBack                       = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmRunBack");
     this.fsmRunForwardToTree              = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmRunForwardToTree");
     this.fsmRunForward                    = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmRunForward");
     this.fsmStalkToTree                   = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmStalkToTree");
     this.fsmStalkToFlank                  = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmStalkToFlank");
     this.fsmStalkRunTowards               = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmStalkRunTowards");
     this.fsmStalkLeaveArea                = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmStalkLeaveArea");
     this.fsmStalkToSneakForward           = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmStalkToSneakForward");
     this.fsmStalkToRock                   = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmStalkToRock");
     this.fsmStalkToAmbush                 = this.setup.pmCombat.FsmVariables.GetFsmFloat("fsmStalkToAmbush");
     this.fsmFindPointNearPlayer           = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmFindPointNearPlayer");
     this.fsmFindRandomPoint               = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmFindRandomPoint");
     this.fsmRandomSearchRange             = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmRandomSearchRange");
     this.fsmFindWayPoint                  = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmFindWayPoint");
     this.fsmFindStructure                 = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmFindStructure");
     this.fsmFindPlaneCrash                = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmFindPlaneCrash");
     this.fsmDaysToSearchPlane             = this.setup.pmSearch.FsmVariables.GetFsmInt("fsmDaysToSearchPlane");
     this.fsmFindPlayerRangedPoint         = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmFindPlayerRangedPoint");
     this.fsmSearchToWalk                  = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmSearchToWalk");
     this.fsmSearchToRun                   = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmSearchToRun");
     this.FsmSearchWaitMin                 = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmSearchWaitMin");
     this.FsmSearchWaitMax                 = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmSearchWaitMax");
     this.fsmSearchRangedValue             = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmSearchRangedValue");
     this.fsmSearchToEncounter             = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmSearchToEncounter");
     this.fsmSearchToCall                  = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmSearchToCall");
     this.fsmSearchToPlaceArt              = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmSearchToPlaceArt");
     this.fsmSearchToSearch                = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmSearchToSearch");
     this.fsmSearchToSleep                 = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmSearchToSleep");
     this.fsmSearchToStructure             = this.setup.pmSearch.FsmVariables.GetFsmFloat("fsmSearchToStructure");
     this.fsmWayPointArriveDist            = this.setup.pmSearch.FsmVariables.GetFsmFloat("waypointArriveDist");
     this.searchFunctions.cautiousReset    = 24f;
     this.searchFunctions.searchReset      = 30f;
     this.searchFunctions.playerAwareReset = 30f;
     this.setDefaultCombat();
     this.setDefaultStalking();
     this.setDefaultSearching();
 }
示例#4
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;
         }
     }
 }
示例#5
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;
         }
     }
 }