Example #1
0
 private void Awake()
 {
     this.avoidScript = base.transform.GetComponentInChildren <animalAvoidance1>();
     this.sceneInfo   = Scene.SceneTracker;
     if (this.parentSetup)
     {
         this.avatar = base.GetComponentInChildren <Animator>();
     }
     else
     {
         this.avatar = base.GetComponent <Animator>();
     }
     this.spawnFunctions  = base.GetComponent <animalSpawnFunctions>();
     this.rootTr          = base.transform;
     this.Tr              = this.avatar.transform;
     this.deadZone       *= 0.0174532924f;
     this.searchFunctions = base.transform.GetComponent <animalSearchFunctions>();
     this.seeker          = base.GetComponent <Seeker>();
     this.layerMask2      = 33556480;
     PlayMakerFSM[] components = base.gameObject.GetComponents <PlayMakerFSM>();
     PlayMakerFSM[] array      = components;
     for (int i = 0; i < array.Length; i++)
     {
         PlayMakerFSM playMakerFSM = array[i];
         if (playMakerFSM.FsmName == "aiBaseFSM")
         {
             this.playMaker = playMakerFSM;
         }
         if (playMakerFSM.FsmName == "moveFSM")
         {
             this.pmMove = playMakerFSM;
         }
     }
 }
Example #2
0
 private void Start()
 {
     this.InitAnimator();
     this.info = Scene.SceneTracker;
     this.setupEncounter();
     base.Invoke("forceEnable", 0.5f);
 }
Example #3
0
 private void Awake()
 {
     if (BoltNetwork.isClient)
     {
         UnityEngine.Object.Destroy(base.gameObject);
         return;
     }
     if (Cheats.NoEnemies)
     {
         this.amount_skinny_pale   = 0;
         this.amount_male_skinny   = 0;
         this.amount_female_skinny = 0;
         this.amount_male          = 0;
         this.amount_female        = 0;
         this.amount_fireman       = 0;
         this.amount_pale          = 0;
         this.amount_armsy         = 0;
         this.amount_vags          = 0;
         this.amount_baby          = 0;
         this.amount_fat           = 0;
     }
     this.tr            = base.transform;
     this.sceneInfo     = Scene.SceneTracker;
     this.mutantControl = Scene.MutantControler;
 }
 private void Awake()
 {
     this.tr    = base.transform;
     this.info  = Scene.SceneTracker;
     this.ai    = base.gameObject.GetComponent <animalAI>();
     this.spawn = base.GetComponent <animalSpawnFunctions>();
 }
Example #5
0
    private void Start()
    {
        this.rb        = base.transform.GetComponent <Rigidbody>();
        this.col       = base.transform.GetComponent <Collider>();
        this.ragdoll   = base.transform.GetComponent <clsragdollify>();
        this.animator  = base.GetComponent <Animator>();
        this.mySkin    = base.transform.GetComponentInChildren <SkinnedMeshRenderer>();
        this.sceneInfo = Scene.SceneTracker;
        GameObject gameObject = GameObject.FindGameObjectWithTag("OceanHeight");

        if (gameObject)
        {
            this.oceanTr = gameObject.transform;
        }
        this.tr       = base.transform;
        this.initBool = true;
        this.setupInvokes();
        if (!base.GetComponent <Rigidbody>())
        {
            base.gameObject.AddComponent <Rigidbody>();
        }
        base.GetComponent <Rigidbody>().isKinematic = true;
        this.animator.speed = this.Speed;
        if (this.typeCaveFish)
        {
            this.randScale            = UnityEngine.Random.Range(0.35f, 0.5f);
            base.transform.localScale = new Vector3(this.randScale, this.randScale, this.randScale);
        }
        this.allPlayers = new List <GameObject>(Scene.SceneTracker.allPlayers);
        this.updatePlayerTargets();
    }
Example #6
0
 private void Awake()
 {
     this.sceneInfo = Scene.SceneTracker;
     this.thisTr    = base.transform;
     this.layer     = 26;
     this.layerMask = 1 << this.layer;
 }
Example #7
0
 private void Awake()
 {
     Scene.ActiveMB           = this;
     Scene.GameStats          = this._gameStats;
     Scene.SceneTracker       = this._sceneTracker;
     Scene.MutantControler    = this._mutantControler;
     Scene.MutantSpawnManager = this._mutantSpawnManager;
     Scene.Yacht            = this._yacht;
     Scene.PlaneCrash       = this._plane;
     Scene.PlaneCrashAnimGO = this._planeCrashAnimGO;
     Scene.TriggerCutScene  = this._triggerCutScene;
     Scene.RainFollowGO     = this._rainFollowGO;
     Scene.RainTypes        = this._rainTypes;
     Scene.WeatherSystem    = this._weatherSystem;
     Scene.HudGui           = this._hudGui;
     Scene.Cams             = this._cams;
     Scene.Clock            = this._clock;
     Scene.Atmosphere       = this._atmos;
     Scene.WorkScheduler    = this._workScheduler;
     Scene.LoadSave         = this._loadSave;
     Scene.PlaneGreebles    = this._planeGreebles;
     Scene.OceanFlat        = this._oceanFlat;
     Scene.OceanCeto        = this._oceanCeto;
     Scene.ShoreMask        = this._shoreMask;
     Scene.SinkHoleCenter   = this._sinkHoleCenter;
     Scene.CaveGrounds      = this._caveGrounds;
 }
Example #8
0
 private void OnDestroy()
 {
     Scene.ActiveMB           = null;
     Scene.GameStats          = null;
     Scene.SceneTracker       = null;
     Scene.MutantControler    = null;
     Scene.MutantSpawnManager = null;
     Scene.Yacht            = null;
     Scene.PlaneCrash       = null;
     Scene.PlaneCrashAnimGO = null;
     Scene.TriggerCutScene  = null;
     Scene.RainFollowGO     = null;
     Scene.RainTypes        = null;
     Scene.WeatherSystem    = null;
     Scene.HudGui           = null;
     Scene.Cams             = null;
     Scene.Clock            = null;
     Scene.Atmosphere       = null;
     Scene.WorkScheduler    = null;
     Scene.LoadSave         = null;
     Scene.PlaneGreebles    = null;
     Scene.OceanFlat        = null;
     Scene.OceanCeto        = null;
     Scene.ShoreMask        = null;
     Scene.SinkHoleCenter   = null;
     Scene.CaveGrounds      = null;
 }
Example #9
0
 private void Awake()
 {
     Scene.ActiveMB = this;
     Scene.GameStats = this._gameStats;
     Scene.SceneTracker = this._sceneTracker;
     Scene.MutantControler = this._mutantControler;
     Scene.MutantSpawnManager = this._mutantSpawnManager;
     Scene.Yacht = this._yacht;
     Scene.PlaneCrash = this._plane;
     Scene.PlaneCrashAnimGO = this._planeCrashAnimGO;
     Scene.TriggerCutScene = this._triggerCutScene;
     Scene.RainFollowGO = this._rainFollowGO;
     Scene.RainTypes = this._rainTypes;
     Scene.WeatherSystem = this._weatherSystem;
     Scene.HudGui = this._hudGui;
     Scene.Cams = this._cams;
     Scene.Clock = this._clock;
     Scene.Atmosphere = this._atmos;
     Scene.WorkScheduler = this._workScheduler;
     Scene.LoadSave = this._loadSave;
     Scene.PlaneGreebles = this._planeGreebles;
     Scene.OceanFlat = this._oceanFlat;
     Scene.OceanCeto = this._oceanCeto;
     Scene.ShoreMask = this._shoreMask;
     Scene.SinkHoleCenter = this._sinkHoleCenter;
     Scene.CaveGrounds = this._caveGrounds;
 }
Example #10
0
 private void Start()
 {
     this.scene = GameObject.FindWithTag("Ai").GetComponent <sceneTracker>();
     if (!this.scene.allPlayers.Contains(base.gameObject))
     {
         this.scene.allPlayers.Add(base.gameObject);
     }
 }
 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;
 }
Example #12
0
 private void Awake()
 {
     this.ai             = base.GetComponent <animalAI>();
     this.spawnFunctions = base.GetComponent <animalSpawnFunctions>();
     this.scene          = Scene.SceneTracker;
     this.MP             = base.gameObject.GetComponent <mutantPropManager>();
     this.animator       = base.GetComponentInChildren <Animator>();
     this.startHealth    = this.Health;
 }
Example #13
0
 private void Start()
 {
     this.MyClock       = Scene.Clock;
     this.mutantControl = Scene.MutantControler;
     this.sceneInfo     = Scene.SceneTracker;
     this.netAnimator   = base.transform.FindChild("player_BASE").GetComponent <Animator>();
     base.InvokeRepeating("checkGroundTag", 1f, 2f);
     if (this.debugAddToPlayerList)
     {
         Scene.SceneTracker.allPlayers.Add(base.gameObject);
     }
 }
Example #14
0
 private void Awake()
 {
     if (this.fish)
     {
         this.fishAi = base.GetComponent <Fish>();
     }
     this.animator = base.GetComponent <Animator>();
     if (this.animator == null)
     {
         this.animator = base.GetComponentInChildren <Animator>();
     }
     this.ai        = base.GetComponent <animalAI>();
     this.thisTr    = base.transform;
     this.sceneInfo = Scene.SceneTracker;
 }
Example #15
0
 private void Start()
 {
     this.scene = Scene.SceneTracker;
     if (this.addToSwim && !this.scene.swimMarkers.Contains(base.gameObject))
     {
         this.scene.swimMarkers.Add(base.gameObject);
     }
     if (this.addToBeach && !this.scene.beachMarkers.Contains(base.gameObject))
     {
         this.scene.beachMarkers.Add(base.gameObject);
     }
     if (this.addToEntrance && !this.scene.caveMarkers.Contains(base.gameObject))
     {
         this.scene.caveMarkers.Add(base.gameObject);
     }
     if (this.addToWaypoint && !this.scene.waypointMarkers.Contains(base.gameObject))
     {
         this.scene.waypointMarkers.Add(base.gameObject);
     }
 }
Example #16
0
 private void OnEnable()
 {
     if (BoltNetwork.isClient)
     {
         return;
     }
     this.sceneTracker = Scene.SceneTracker;
     AnimalSpawnController.lastUpdate = Time.time;
     this.Zones = base.GetComponentsInChildren <AnimalSpawnZone>();
     AnimalSpawnZone[] zones = this.Zones;
     for (int i = 0; i < zones.Length; i++)
     {
         AnimalSpawnZone animalSpawnZone = zones[i];
         animalSpawnZone.SpawnedAnimals = new List <GameObject>();
         for (int j = 0; j < animalSpawnZone.Spawns.Length; j++)
         {
             animalSpawnZone.TotalWeight += animalSpawnZone.Spawns[j].Weight;
             animalSpawnZone.Spawns[j].WeightRunningTotal = animalSpawnZone.TotalWeight;
         }
     }
 }
Example #17
0
 private void Start()
 {
     this.randPoint       = this.Circle2(UnityEngine.Random.Range(8f, 30f));
     this.rb              = base.GetComponent <Rigidbody>();
     this.sceneInfo       = Scene.SceneTracker;
     this.collisionGo     = base.transform.GetComponentInChildren <gooseAvoidance>().gameObject;
     this.collisionCol    = this.collisionGo.GetComponent <CapsuleCollider>();
     this.collisionRb     = this.collisionGo.GetComponent <Rigidbody>();
     this.avoidance       = this.collisionGo.GetComponent <gooseAvoidance>();
     this.animator        = base.GetComponentInChildren <Animator>();
     this.vis             = base.GetComponentInChildren <simpleVis>();
     this.tr              = base.transform;
     this.rotateTr        = this.animator.transform;
     this.initSpeed       = this.Speed;
     this.initRotateSpeed = this.rotateSpeed;
     base.InvokeRepeating("SwitchDirection", UnityEngine.Random.Range(2f, 4f), UnityEngine.Random.Range(5f, 10f));
     base.InvokeRepeating("checkForwardCollide", UnityEngine.Random.Range(1f, 3f), 0.3f);
     base.InvokeRepeating("setRandomSpeed", UnityEngine.Random.Range(2f, 5f), UnityEngine.Random.Range(5f, 10f));
     base.InvokeRepeating("checkDistances", UnityEngine.Random.Range(0f, 5f), 1.5f);
     this.allPlayers = new List <GameObject>(this.sceneInfo.allPlayers);
     this.updatePlayerTargets();
 }
Example #18
0
 private void Awake()
 {
     if (BoltNetwork.isClient)
     {
         UnityEngine.Object.Destroy(base.gameObject);
         return;
     }
     if (Cheats.NoEnemies)
     {
         this.amount_skinny_pale = 0;
         this.amount_male_skinny = 0;
         this.amount_female_skinny = 0;
         this.amount_male = 0;
         this.amount_female = 0;
         this.amount_fireman = 0;
         this.amount_pale = 0;
         this.amount_armsy = 0;
         this.amount_vags = 0;
         this.amount_baby = 0;
         this.amount_fat = 0;
     }
     this.tr = base.transform;
     this.sceneInfo = Scene.SceneTracker;
     this.mutantControl = Scene.MutantControler;
 }
Example #19
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;
         }
     }
 }
Example #20
0
 private void Awake()
 {
     this.sceneInfo = Scene.SceneTracker;
     this.thisTr = base.transform;
     this.layer = 26;
     this.layerMask = 1 << this.layer;
 }
Example #21
0
 private void Awake()
 {
     this.info = Scene.SceneTracker;
 }
Example #22
0
 private void Awake()
 {
     this.sceneInfo = Scene.SceneTracker;
     this.thisTr    = base.transform;
 }
 private void Start()
 {
     this.InitAnimator();
     this.info = Scene.SceneTracker;
     this.setupEncounter();
     base.Invoke("forceEnable", 0.5f);
 }
Example #24
0
 private void Start()
 {
     this.layerMask = 513;
     base.InvokeRepeating("checkHandConditions", 1f, 8f);
     base.InvokeRepeating("updateBirdAmounts", 1f, 120f);
     this.initIdealBirds = this.idealNumberOfBirds;
     this.initMaxBirds = this.maximumNumberOfBirds;
     this.modIdealBirds = this.idealNumberOfBirds;
     this.modMaxBirds = this.maximumNumberOfBirds;
     this.sceneInfo = Scene.SceneTracker;
     if (this.idealNumberOfBirds >= this.maximumNumberOfBirds)
     {
         this.idealNumberOfBirds = this.maximumNumberOfBirds - 1;
     }
     if (this.seagull)
     {
         this.myBirdTypes.Add("lb_seagull");
     }
     if (this.blueBird)
     {
         this.myBirdTypes.Add("lb_blueBird");
     }
     if (this.redBird)
     {
         this.myBirdTypes.Add("lb_redBird");
     }
     if (this.chickadee)
     {
         this.myBirdTypes.Add("lb_chickadee");
     }
     if (this.sparrow)
     {
         this.myBirdTypes.Add("lb_sparrow");
     }
     if (this.crow)
     {
         this.myBirdTypes.Add("lb_crow");
     }
     this.myBirds = new GameObject[this.maximumNumberOfBirds];
     for (int i = 0; i < this.myBirds.Length; i++)
     {
         GameObject original = Resources.Load(this.myBirdTypes[UnityEngine.Random.Range(0, this.myBirdTypes.Count)], typeof(GameObject)) as GameObject;
         this.myBirds[i] = (UnityEngine.Object.Instantiate(original, Vector3.zero, Quaternion.identity) as GameObject);
         this.myBirds[i].SendMessage("SetController", this);
         this.myBirds[i].SetActive(false);
     }
     GameObject[] array = GameObject.FindGameObjectsWithTag("lb_groundTarget");
     GameObject[] array2 = GameObject.FindGameObjectsWithTag("lb_perchTarget");
     if (this.currentCamera)
     {
         for (int j = 0; j < array.Length; j++)
         {
             if (Vector3.Distance(array[j].transform.position, this.currentCamera.transform.position) < this.unspawnDistance)
             {
                 this.birdGroundTargets.Add(array[j]);
             }
         }
         for (int k = 0; k < array2.Length; k++)
         {
             if (Vector3.Distance(array2[k].transform.position, this.currentCamera.transform.position) < this.unspawnDistance)
             {
                 this.birdPerchTargets.Add(array2[k]);
             }
         }
     }
     if (!base.IsInvoking("UpdateBirds"))
     {
         base.InvokeRepeating("UpdateBirds", 30f, 2f);
     }
     base.StopCoroutine("UpdateTargets");
     this.birdPerchTargets.Clear();
     this.birdGroundTargets.Clear();
     base.StartCoroutine("UpdateTargets");
 }
Example #25
0
 private void Awake()
 {
     BleedBehavior.BloodAmount = 0f;
     BleedBehavior.BloodReductionRatio = 1f;
     this.explodeHash = Animator.StringToHash("explode");
     this.DSpots = GameObject.FindWithTag("DeadSpots").GetComponent<DeadSpotController>();
     this.Hud = Scene.HudGui;
     this.Ocean = GameObject.FindWithTag("Ocean");
     this.mutantControl = Scene.MutantControler;
     this.sceneInfo = Scene.SceneTracker;
     this.Player = base.gameObject.GetComponent<PlayerInventory>();
     this.camFollow = base.GetComponentInChildren<camFollowHead>();
     this.hitReaction = base.GetComponent<playerHitReactions>();
     this.Atmos = Scene.Atmosphere;
     this.FrostScript = LocalPlayer.MainCam.GetComponent<Frost>();
     this.Tuts = LocalPlayer.Tuts;
     this.Sfx = LocalPlayer.Sfx;
     this.animator = LocalPlayer.Animator;
     this.DyingVision = LocalPlayer.MainCam.GetComponent<Grayscale>();
     this.Fullness = 1f;
     this.bloodPropertyBlock = new MaterialPropertyBlock();
     if (!LevelSerializer.IsDeserializing)
     {
         CoopPlayerVariations component = base.GetComponent<CoopPlayerVariations>();
         this.PlayerVariation = UnityEngine.Random.Range(0, component.Variations.Length);
         this.PlayerVariationBody = UnityEngine.Random.Range(0, component.BodyMaterials.Length);
     }
     if (this.CurrentArmorTypes == null || this.CurrentArmorTypes.Length != this.ArmorModel.Length)
     {
         this.CurrentArmorTypes = new PlayerStats.ArmorTypes[this.ArmorModel.Length];
         for (int i = 0; i < this.CurrentArmorTypes.Length; i++)
         {
             this.CurrentArmorTypes[i] = PlayerStats.ArmorTypes.None;
             this.ArmorModel[i].SetActive(false);
         }
     }
     if (this.CurrentArmorHP == null || this.CurrentArmorHP.Length != this.ArmorModel.Length)
     {
         this.CurrentArmorHP = new int[this.ArmorModel.Length];
     }
     this.CaveDoors = GameObject.FindGameObjectsWithTag("CaveDoor");
 }
Example #26
0
 private void Awake()
 {
     this.info = Scene.SceneTracker;
 }
Example #27
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;
         }
     }
 }
Example #28
0
 private void Start()
 {
     this.MyClock = Scene.Clock;
     this.mutantControl = Scene.MutantControler;
     this.sceneInfo = Scene.SceneTracker;
     this.netAnimator = base.transform.FindChild("player_BASE").GetComponent<Animator>();
     base.InvokeRepeating("checkGroundTag", 1f, 2f);
     if (this.debugAddToPlayerList)
     {
         Scene.SceneTracker.allPlayers.Add(base.gameObject);
     }
 }
Example #29
0
 private void Awake()
 {
     this.sceneInfo = Scene.SceneTracker;
     this.thisTr = base.transform;
 }
Example #30
0
 private void Awake()
 {
     this.sceneInfo = Scene.SceneTracker;
     playerScriptSetup.playerTransform = base.transform;
     this.targetFunctions = base.GetComponent <playerTargetFunctions>();
     this.hashName        = Animator.StringToHash(base.transform.root.name);
     PlayMakerFSM[] components = base.transform.GetComponents <PlayMakerFSM>();
     PlayMakerFSM[] array      = components;
     for (int i = 0; i < array.Length; i++)
     {
         PlayMakerFSM playMakerFSM = array[i];
         if (playMakerFSM.FsmName == "rotatePlayerFSM")
         {
             this.pmRotate = playMakerFSM;
         }
         if (playMakerFSM.FsmName == "controlFSM")
         {
             this.pmControl = playMakerFSM;
         }
         if (playMakerFSM.FsmName == "targetManagerFSM")
         {
             this.pmTarget = playMakerFSM;
         }
         if (playMakerFSM.FsmName == "staminaFSM")
         {
             this.pmStamina = playMakerFSM;
         }
         if (playMakerFSM.FsmName == "noiseDetectFSM")
         {
             this.pmNoise = playMakerFSM;
         }
         if (playMakerFSM.FsmName == "damageFSM")
         {
             this.pmDamage = playMakerFSM;
         }
         if (playMakerFSM.FsmName == "tempBlockManagerFSM")
         {
             this.pmBlock = playMakerFSM;
         }
     }
     PlayMakerArrayListProxy[] components2 = base.transform.GetComponents <PlayMakerArrayListProxy>();
     PlayMakerArrayListProxy[] array2      = components2;
     for (int j = 0; j < array2.Length; j++)
     {
         PlayMakerArrayListProxy playMakerArrayListProxy = array2[j];
         if (playMakerArrayListProxy.referenceName == "attackers")
         {
             this.proxyAttackers = playMakerArrayListProxy;
         }
     }
     Transform[] componentsInChildren = base.transform.root.gameObject.GetComponentsInChildren <Transform>();
     Transform[] array3 = componentsInChildren;
     for (int k = 0; k < array3.Length; k++)
     {
         Transform transform = array3[k];
         if (transform.name == "char_Spine")
         {
             this.spine1 = transform;
         }
         if (transform.name == "char_Spine1")
         {
             this.spine2 = transform;
         }
         if (transform.name == "char_Spine2")
         {
             this.spine3 = transform;
         }
         if (transform.name == "MainCamNew")
         {
             this.playerCam = transform;
         }
         if (transform.name == "OVRCameraController")
         {
             this.OvrCam = transform;
         }
         if (transform.name == "LookObject")
         {
             this.camParent = transform;
         }
         if (transform.name == "char_Head1")
         {
             this.headJnt = transform;
         }
         if (transform.name == "player_BASE")
         {
             this.playerBase = transform.gameObject;
         }
         if (transform.name == "lookAtGo")
         {
             this.lookAtTr = transform;
         }
         if (transform.name == "playerHitDetect")
         {
             this.bodyCollisionGo = transform.gameObject;
         }
         if (transform.name == "char_RightHandWeapon")
         {
             this.weaponRight = transform;
         }
         if (transform.name == "char_LeftHand1")
         {
             this.leftHand = transform;
         }
         if (transform.name == "char_LeftArm")
         {
             this.leftArm = transform;
         }
         if (transform.name == "char_RightArm")
         {
             this.rightArm = transform;
         }
         if (transform.name == "char_Neck")
         {
             this.neckJnt = transform;
         }
         if (transform.name == "char_Hips")
         {
             this.hipsJnt = transform;
         }
         if (transform.name == "smallBird_ANIM_landOnFinger")
         {
             this.smallBirdGo = transform.gameObject;
         }
         if (transform.name == "soundDetectGo")
         {
             this.soundDetectGo = transform.gameObject;
         }
         if (transform.name == "enemyBlocker")
         {
             this.enemyBlockerGo = transform.gameObject;
         }
     }
 }
Example #31
0
 private void Start()
 {
     this.layerMask = 513;
     base.InvokeRepeating("checkHandConditions", 1f, 8f);
     base.InvokeRepeating("updateBirdAmounts", 1f, 120f);
     this.initIdealBirds = this.idealNumberOfBirds;
     this.initMaxBirds   = this.maximumNumberOfBirds;
     this.modIdealBirds  = this.idealNumberOfBirds;
     this.modMaxBirds    = this.maximumNumberOfBirds;
     this.sceneInfo      = Scene.SceneTracker;
     if (this.idealNumberOfBirds >= this.maximumNumberOfBirds)
     {
         this.idealNumberOfBirds = this.maximumNumberOfBirds - 1;
     }
     if (this.seagull)
     {
         this.myBirdTypes.Add("lb_seagull");
     }
     if (this.blueBird)
     {
         this.myBirdTypes.Add("lb_blueBird");
     }
     if (this.redBird)
     {
         this.myBirdTypes.Add("lb_redBird");
     }
     if (this.chickadee)
     {
         this.myBirdTypes.Add("lb_chickadee");
     }
     if (this.sparrow)
     {
         this.myBirdTypes.Add("lb_sparrow");
     }
     if (this.crow)
     {
         this.myBirdTypes.Add("lb_crow");
     }
     this.myBirds = new GameObject[this.maximumNumberOfBirds];
     for (int i = 0; i < this.myBirds.Length; i++)
     {
         GameObject original = Resources.Load(this.myBirdTypes[UnityEngine.Random.Range(0, this.myBirdTypes.Count)], typeof(GameObject)) as GameObject;
         this.myBirds[i] = (UnityEngine.Object.Instantiate(original, Vector3.zero, Quaternion.identity) as GameObject);
         this.myBirds[i].SendMessage("SetController", this);
         this.myBirds[i].SetActive(false);
     }
     GameObject[] array  = GameObject.FindGameObjectsWithTag("lb_groundTarget");
     GameObject[] array2 = GameObject.FindGameObjectsWithTag("lb_perchTarget");
     if (this.currentCamera)
     {
         for (int j = 0; j < array.Length; j++)
         {
             if (Vector3.Distance(array[j].transform.position, this.currentCamera.transform.position) < this.unspawnDistance)
             {
                 this.birdGroundTargets.Add(array[j]);
             }
         }
         for (int k = 0; k < array2.Length; k++)
         {
             if (Vector3.Distance(array2[k].transform.position, this.currentCamera.transform.position) < this.unspawnDistance)
             {
                 this.birdPerchTargets.Add(array2[k]);
             }
         }
     }
     if (!base.IsInvoking("UpdateBirds"))
     {
         base.InvokeRepeating("UpdateBirds", 30f, 2f);
     }
     base.StopCoroutine("UpdateTargets");
     this.birdPerchTargets.Clear();
     this.birdGroundTargets.Clear();
     base.StartCoroutine("UpdateTargets");
 }
Example #32
0
 private void OnEnable()
 {
     this.LastUpdate   = Time.time;
     this.sceneTracker = Scene.SceneTracker;
 }
Example #33
0
 private void OnDestroy()
 {
     Scene.ActiveMB = null;
     Scene.GameStats = null;
     Scene.SceneTracker = null;
     Scene.MutantControler = null;
     Scene.MutantSpawnManager = null;
     Scene.Yacht = null;
     Scene.PlaneCrash = null;
     Scene.PlaneCrashAnimGO = null;
     Scene.TriggerCutScene = null;
     Scene.RainFollowGO = null;
     Scene.RainTypes = null;
     Scene.WeatherSystem = null;
     Scene.HudGui = null;
     Scene.Cams = null;
     Scene.Clock = null;
     Scene.Atmosphere = null;
     Scene.WorkScheduler = null;
     Scene.LoadSave = null;
     Scene.PlaneGreebles = null;
     Scene.OceanFlat = null;
     Scene.OceanCeto = null;
     Scene.ShoreMask = null;
     Scene.SinkHoleCenter = null;
     Scene.CaveGrounds = null;
 }