private void OnDestroy() { if (LocalPlayer.Transform == base.transform) { LocalPlayer.Transform = null; LocalPlayer.Ridigbody = null; FMOD_StudioEventEmitter.LocalPlayerTransform = null; LocalPlayer.GameObject = null; LocalPlayer.PlayerBase = null; LocalPlayer.HeadTr = null; LocalPlayer.HipsTr = null; LocalPlayer.Inventory = null; LocalPlayer.ReceipeBook = null; LocalPlayer.SpecialActions = null; LocalPlayer.SpecialItems = null; LocalPlayer.MainCamTr = null; LocalPlayer.MainCam = null; LocalPlayer.InventoryCam = null; LocalPlayer.CamFollowHead = null; LocalPlayer.Animator = null; LocalPlayer.AnimControl = null; LocalPlayer.Create = null; LocalPlayer.Tuts = null; LocalPlayer.Sfx = null; LocalPlayer.Stats = null; LocalPlayer.FpCharacter = null; LocalPlayer.FpHeadBob = null; LocalPlayer.CamRotator = null; LocalPlayer.MainRotator = null; LocalPlayer.ScriptSetup = null; LocalPlayer.TargetFunctions = null; LocalPlayer.HitReactions = null; LocalPlayer.Buoyancy = null; LocalPlayer.WaterViz = null; LocalPlayer.AiInfo = null; LocalPlayer.WaterEngine = null; LocalPlayer.ItemDecayMachine = null; LocalPlayer.AnimatedBook = null; LocalPlayer.PassengerManifest = null; LocalPlayer.GreebleRoot = null; LocalPlayer.MudGreeble = null; LocalPlayer.PlayerDeadCam = null; LocalPlayer.PauseMenuBlur = null; LocalPlayer.PauseMenuBlurPsCam = null; LocalPlayer.HeldItemsData = null; LocalPlayer.Vis = null; } }
private void Start() { this.tf = LocalPlayer.ScriptSetup.targetFunctions; if (this.host && !base.IsInvoking("updateCloseTrees")) { base.InvokeRepeating("updateCloseTrees", 2f, 2f); } if (!base.IsInvoking("updateVisParams")) { base.InvokeRepeating("updateVisParams", 2f, 0.65f); } if (!BoltNetwork.isClient && !base.IsInvoking("updateTarget")) { base.InvokeRepeating("updateTarget", 2f, 1.5f); } }
private void Awake() { LocalPlayer.Transform = this._transform; LocalPlayer.Ridigbody = this._ridigbody; FMOD_StudioEventEmitter.LocalPlayerTransform = LocalPlayer.Transform; LocalPlayer.GameObject = this._playerGO; LocalPlayer.PlayerBase = this._playerBase; LocalPlayer.HeadTr = this._headTr; LocalPlayer.HipsTr = this._hipsTr; LocalPlayer.Inventory = this._inventory; LocalPlayer.ReceipeBook = this._receipeBook; LocalPlayer.SpecialActions = this._specialActions; LocalPlayer.SpecialItems = this._specialItems; LocalPlayer.MainCamTr = this._mainCamTr; LocalPlayer.MainCam = this._mainCam; LocalPlayer.InventoryCam = this._inventoryCam; LocalPlayer.CamFollowHead = this._camFollowHead; LocalPlayer.Animator = this._animator; LocalPlayer.AnimControl = this._animControl; LocalPlayer.Create = this._create; LocalPlayer.Tuts = this._tuts; LocalPlayer.Sfx = this._sfx; LocalPlayer.Stats = this._stats; LocalPlayer.FpCharacter = this._fpc; LocalPlayer.FpHeadBob = this._fphb; LocalPlayer.CamRotator = this._camRotator; LocalPlayer.MainRotator = this._mainRotator; LocalPlayer.ScriptSetup = this._scriptSetup; LocalPlayer.TargetFunctions = this._targetFunctions; LocalPlayer.HitReactions = this._hitReactions; LocalPlayer.Buoyancy = this._buoyancy; LocalPlayer.WaterViz = this._waterViz; LocalPlayer.AiInfo = this._aiInfo; LocalPlayer.WaterEngine = this._waterEngine; LocalPlayer.ItemDecayMachine = this._itemDecayMachine; LocalPlayer.AnimatedBook = this._animatedBook; LocalPlayer.PassengerManifest = this._passengerManifest; LocalPlayer.GreebleRoot = this._greebleRoot; LocalPlayer.MudGreeble = this._mudGreeble; LocalPlayer.PlayerDeadCam = this._PlayerDeadCam; LocalPlayer.PauseMenuBlur = this._pauseMenuBlur; LocalPlayer.PauseMenuBlurPsCam = this._pauseMenuBlurPsCam; LocalPlayer.HeldItemsData = this._heldItemsData; LocalPlayer.Vis = this._vis; base.StartCoroutine(this.OldSaveCompat()); }
private void Awake() { this.buoyancy = base.GetComponent <Buoyancy>(); this.rb = base.GetComponent <Rigidbody>(); this.playerPhysicMaterial = base.GetComponent <CapsuleCollider>().material; this.playerPhysicMaterial2 = base.GetComponent <SphereCollider>().material; this.rb.freezeRotation = true; this.rb.useGravity = false; this.collFlags = base.transform.GetComponent <RigidBodyCollisionFlags>(); this.setup = base.GetComponentInChildren <playerScriptSetup>(); this.targets = base.GetComponentInChildren <playerTargetFunctions>(); this.UnLockView(); this.capsule = (base.GetComponent <Collider>() as CapsuleCollider); this.defaultMass = this.rb.mass; this.originalHeight = this.capsule.height; this.originalYPos = this.capsule.center.y; this.crouchCapsuleCenter = (this.crouchHeight - this.originalHeight) / 2f; this.Grounded = true; this.fsmCrouchBool = FsmVariables.GlobalVariables.GetFsmBool("playerCrouchBool"); }
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; } } }