private void Awake() { this.ai = base.GetComponent<animalAI>(); this.animator = base.GetComponent<Animator>(); this.avoidance = base.transform.GetComponentInChildren<animalAvoidance>(); this.Tr = base.transform; }
private void Awake() { this.ai = base.GetComponent <animalAI>(); this.animator = base.GetComponent <Animator>(); this.avoidance = base.transform.GetComponentInChildren <animalAvoidance>(); this.Tr = base.transform; }
private void Awake() { this.tr = base.transform; this.info = Scene.SceneTracker; this.ai = base.gameObject.GetComponent <animalAI>(); this.spawn = base.GetComponent <animalSpawnFunctions>(); }
private void Awake() { this.ai = base.transform.parent.GetComponent <animalAI>(); this.animator = base.GetComponent <Animator>(); this.Tr = base.transform.parent; this.rotateTr = base.transform; this.layer = 26; }
private void Awake() { this.ai = base.transform.parent.GetComponent<animalAI>(); this.animator = base.GetComponent<Animator>(); this.Tr = base.transform.parent; this.rotateTr = base.transform; this.layer = 26; }
private void Awake() { this.ai = base.transform.parent.GetComponent <animalAI>(); this.avoidance = base.GetComponentInChildren <animalAvoidance>(); this.animator = base.GetComponent <Animator>(); this.waterChecker = base.GetComponentInChildren <inWaterChecker>(); this.Tr = base.transform.parent; this.rotateTr = base.transform; }
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; }
private void Awake() { this.ai = base.transform.parent.GetComponent<animalAI>(); this.avoidance = base.GetComponentInChildren<animalAvoidance>(); this.animator = base.GetComponent<Animator>(); this.waterChecker = base.GetComponentInChildren<inWaterChecker>(); this.Tr = base.transform.parent; this.rotateTr = base.transform; }
private void Awake() { this.ai = base.transform.parent.GetComponent<animalAI>(); this.animator = base.GetComponent<Animator>(); this.avoidance = base.transform.GetComponentInChildren<animalAvoidance>(); this.Tr = base.transform.parent; this.rotateTr = base.transform; this.runHash = Animator.StringToHash("run"); this.idleHash = Animator.StringToHash("idle"); }
private void Awake() { this.ai = base.transform.parent.GetComponent <animalAI>(); this.animator = base.GetComponent <Animator>(); this.avoidance = base.transform.GetComponentInChildren <animalAvoidance>(); this.Tr = base.transform.parent; this.rotateTr = base.transform; this.runHash = Animator.StringToHash("run"); this.idleHash = Animator.StringToHash("idle"); }
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; }
private void Start() { this.avoidance = base.transform.GetComponentInChildren <turtleAvoidance>(); GameObject gameObject = GameObject.FindWithTag("OceanHeight"); if (gameObject) { this.ocean = gameObject.transform; } this.ai = base.GetComponent <animalAI>(); this.animator = base.GetComponent <Animator>(); this.Tr = base.transform; base.InvokeRepeating("randomDepth", 1f, UnityEngine.Random.Range(8f, 15f)); this.layer = 26; this.layerMask = 1 << this.layer; }
private void Start() { this.ai = base.GetComponent <animalAI>(); }
private void Respawn() { UnityEngine.Debug.Log("LocalPlayer -> Respawn"); if (LocalPlayer.Stats.Dead) { LocalPlayer.GameObject.SendMessage("NotInACave"); PlayerInventory inventory = LocalPlayer.Inventory; string name = LocalPlayer.Entity.GetState <IPlayerState>().name; LocalPlayer.Inventory.HideAllEquiped(false); LocalPlayer.Inventory.enabled = false; if (Scene.SceneTracker.allPlayers.Contains(LocalPlayer.GameObject)) { Scene.SceneTracker.allPlayers.Remove(LocalPlayer.GameObject); } if (Scene.SceneTracker.allPlayerEntities.Contains(LocalPlayer.Entity)) { Scene.SceneTracker.allPlayerEntities.Remove(LocalPlayer.Entity); } BoltNetwork.Detach(LocalPlayer.Entity); GameObject gameObject = LocalPlayer.GameObject; BoltEntity entity = LocalPlayer.Entity; gameObject.name = "player Corpse - " + name; gameObject.tag = "Untagged"; LocalPlayer.MainCamTr.parent = LocalPlayer.Transform; LocalPlayer.Inventory.CurrentView = PlayerInventory.PlayerViews.Loot; for (int i = gameObject.transform.childCount - 1; i >= 0; i--) { Transform child = gameObject.transform.GetChild(i); UnityEngine.Object.Destroy(child.gameObject); } Component[] components = gameObject.GetComponents(typeof(MonoBehaviour)); Component[] array = components; for (int j = 0; j < array.Length; j++) { Component component = array[j]; if (!(component is BoltEntity)) { UnityEngine.Object.DestroyImmediate(component); } } Transform transform = base.transform; GameObject gameObject2 = (GameObject)UnityEngine.Object.Instantiate(Prefabs.Instance.PlayerPrefab, transform.position, transform.rotation); gameObject2.transform.localEulerAngles = new Vector3(0f, gameObject2.transform.localEulerAngles.y, 0f); gameObject2.name = Prefabs.Instance.PlayerPrefab.name; LocalPlayer.FpCharacter.UnLockView(); LocalPlayer.CamFollowHead.enableMouseControl(false); LocalPlayer.MainCamTr.localEulerAngles = Vector3.zero; LocalPlayer.MainRotator.enabled = true; LocalPlayer.CamRotator.enabled = true; LocalPlayer.Stats.Health = 28f; LocalPlayer.Stats.Energy = 100f; LocalPlayer.Stats.Fullness = 0.35f; LocalPlayer.Stats.Thirst = 0.35f; LocalPlayer.Stats.Invoke("CheckArmsStart", 2f); LocalPlayer.Stats.Invoke("PlayWakeMusic", 0.5f); Scene.RainFollowGO.GetComponent <SmoothTransformConstraint>().target = LocalPlayer.Transform; gameObject2.SetActive(true); CoopUtils.AttachLocalPlayer(gameObject2, name); Scene.SceneTracker.allPlayers.Add(LocalPlayer.GameObject); LocalPlayer.GreebleRoot.SetActive(true); StealItemTrigger stealItemTrigger = (StealItemTrigger)UnityEngine.Object.Instantiate(Prefabs.Instance.DeadBackpackPrefab, gameObject.transform.position, gameObject.transform.rotation); stealItemTrigger._entity = entity; stealItemTrigger.transform.parent = gameObject.transform; gameObject.AddComponent <DeathMPTut>(); ItemStorage cis = gameObject.AddComponent <ItemStorage>(); for (int k = 0; k < inventory._possessedItems.Count; k++) { InventoryItem inventoryItem = inventory._possessedItems[k]; if (!LocalPlayer.Inventory.Owns(inventoryItem._itemId)) { this.AddItemToStorage(inventoryItem._itemId, inventoryItem._amount, inventoryItem._maxAmountBonus, cis); } } for (int l = 0; l < inventory.EquipmentSlots.Length; l++) { InventoryItemView inventoryItemView = inventory.EquipmentSlots[l]; if (inventoryItemView && inventoryItemView._itemId > 0) { this.AddItemToStorage(inventoryItemView._itemId, 1, 0, cis); } } animalAI[] array2 = UnityEngine.Object.FindObjectsOfType <animalAI>(); animalAI[] array3 = array2; for (int m = 0; m < array3.Length; m++) { animalAI animalAI = array3[m]; animalAI.SendMessage("updatePlayerTargets"); } mutantAI[] array4 = UnityEngine.Object.FindObjectsOfType <mutantAI>(); mutantAI[] array5 = array4; for (int n = 0; n < array5.Length; n++) { mutantAI mutantAI = array5[n]; mutantAI.SendMessage("updatePlayerTargets"); } Fish[] array6 = UnityEngine.Object.FindObjectsOfType <Fish>(); Fish[] array7 = array6; for (int num = 0; num < array7.Length; num++) { Fish fish = array7[num]; fish.SendMessage("updatePlayerTargets"); } mutantScriptSetup[] array8 = UnityEngine.Object.FindObjectsOfType <mutantScriptSetup>(); mutantScriptSetup[] array9 = array8; for (int num2 = 0; num2 < array9.Length; num2++) { mutantScriptSetup mutantScriptSetup = array9[num2]; mutantScriptSetup.setupPlayer(); mutantScriptSetup.search.refreshCurrentTarget(); } Terrain.activeTerrain.GetComponent <Collider>().enabled = true; Scene.Clock.IsNotCave(); } PlayerRespawnMP.Cancel(); }
private void Awake() { this.ai = base.transform.parent.GetComponent <animalAI>(); }
private void Start() { this.ai = this.ControllerGo.GetComponent <animalAI>(); }
private void Start() { this.ai = base.transform.GetComponent <animalAI>(); this.skin = base.transform.GetComponentInChildren <SkinnedMeshRenderer>(); }