private void Start() { this.pVis = base.transform.root.GetComponent<netPlayerVis>(); this.tr = base.transform; this.skin = base.transform.GetComponent<SkinnedMeshRenderer>(); this.setup = base.transform.root.GetComponentInChildren<playerScriptSetup>(); }
private void Start() { this.pVis = base.transform.root.GetComponent <netPlayerVis>(); this.tr = base.transform; this.skin = base.transform.GetComponent <SkinnedMeshRenderer>(); this.setup = base.transform.root.GetComponentInChildren <playerScriptSetup>(); }
private void Start() { this.setup = base.transform.root.GetComponentInChildren <playerScriptSetup>(); this.animator = this.setup.playerBase.GetComponent <Animator>(); this.rootTr = LocalPlayer.PlayerBase.transform; this.axeHeight = 1f; this.fsmLookAtTree = this.setup.pmControl.FsmVariables.GetFsmBool("lookAtTree"); }
private void Awake() { this.camRotator = GameObject.FindWithTag("MainCamera").GetComponent <SimpleMouseRotator>(); this.fps = LocalPlayer.FpCharacter; this.animator = base.transform.GetComponentInChildren <Animator>(); this.setup = base.GetComponentInChildren <playerScriptSetup>(); this.walkSpeed = this.fps.walkSpeed; this.runSpeed = this.fps.runSpeed; this.strafeSpeed = this.fps.strafeSpeed; this.camAnimation = this.camAnim.GetComponent <Animation>(); this._rb = base.GetComponent <Rigidbody>(); }
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 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.baseWeaponDamage = this.weaponDamage; this.baseWeaponSpeed = this.weaponSpeed; this.baseSmashDamage = this.smashDamage; this.baseTiredSpeed = this.tiredSpeed; this.baseStaminaDrain = this.staminaDrain; this.baseSoundDetectRange = this.soundDetectRange; this.baseWeaponRange = this.weaponRange; this.setup = base.transform.root.GetComponentInChildren <playerScriptSetup>(); if (BoltNetwork.isRunning && !this.setup) { return; } base.enabled = false; base.StartCoroutine(this.DelayedAwake()); }
private void Start() { this.setup = base.GetComponent <playerScriptSetup>(); this.animator = base.GetComponent <Animator>(); this.playerTr = base.transform; this.playerRoot = base.transform.root; this.pmControl = this.setup.pmControl; this.pmRotate = this.setup.pmRotate; this.fsmSmashPosLook = this.pmControl.FsmVariables.GetFsmVector3("smashPosLook"); this.fsmTreePos = this.pmRotate.FsmVariables.GetFsmVector3("treeStandPos"); if (!base.IsInvoking("sendStealthValues") && this.setup.sceneInfo) { base.InvokeRepeating("sendStealthValues", 1f, 1f); } if (BoltNetwork.isRunning) { this.maxAttackers = 12; } }
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() { base.GetComponent <Animation>()["turbulanceLight"].wrapMode = WrapMode.Loop; base.GetComponent <Animation>()["turbulanceLight"].speed = 1.2f; base.GetComponent <Animation>()["camShakePlane"].wrapMode = WrapMode.Loop; base.GetComponent <Animation>()["camShakePlane"].speed = 2.4f; base.GetComponent <Animation>()["camShakePlaneStart"].wrapMode = WrapMode.Once; base.GetComponent <Animation>()["camShakePlaneStart"].speed = 1.7f; base.GetComponent <Animation>()["camShakePlaneGround"].wrapMode = WrapMode.Loop; base.GetComponent <Animation>()["camShakePlaneGround"].speed = 3.5f; base.GetComponent <Animation>()["noShake"].wrapMode = WrapMode.Loop; base.GetComponent <Animation>()["camShakeFall"].wrapMode = WrapMode.Loop; base.GetComponent <Animation>()["camShakeFall"].speed = 2.5f; base.GetComponent <Animation>()["turbulanceLight"].layer = 1; base.GetComponent <Animation>()["camShakePlaneGround"].layer = 1; base.GetComponent <Animation>()["camShakePlane"].layer = 1; base.GetComponent <Animation>()["noShake"].layer = 1; base.GetComponent <Animation>()["camShakeFall"].layer = 1; this.setup = base.transform.root.GetComponentInChildren <playerScriptSetup>(); this.thisTr = base.transform; this.mouse1 = base.GetComponentInChildren <SimpleMouseRotator>(); this.mouse2 = base.transform.root.GetComponent <SimpleMouseRotator>(); this.camTr = this.mouse1.transform; }
private void Start() { this.setup = base.GetComponent<playerScriptSetup>(); this.animator = base.GetComponent<Animator>(); this.playerTr = base.transform; this.playerRoot = base.transform.root; this.pmControl = this.setup.pmControl; this.pmRotate = this.setup.pmRotate; this.fsmSmashPosLook = this.pmControl.FsmVariables.GetFsmVector3("smashPosLook"); this.fsmTreePos = this.pmRotate.FsmVariables.GetFsmVector3("treeStandPos"); if (!base.IsInvoking("sendStealthValues") && this.setup.sceneInfo) { base.InvokeRepeating("sendStealthValues", 1f, 1f); } if (BoltNetwork.isRunning) { this.maxAttackers = 12; } }
private void Awake() { this.baseWeaponDamage = this.weaponDamage; this.baseWeaponSpeed = this.weaponSpeed; this.baseSmashDamage = this.smashDamage; this.baseTiredSpeed = this.tiredSpeed; this.baseStaminaDrain = this.staminaDrain; this.baseSoundDetectRange = this.soundDetectRange; this.baseWeaponRange = this.weaponRange; this.setup = base.transform.root.GetComponentInChildren<playerScriptSetup>(); if (BoltNetwork.isRunning && !this.setup) { return; } base.enabled = false; base.StartCoroutine(this.DelayedAwake()); }
private void SetUpWeapons() { if (this.Remote) { return; } this.dig = base.transform.parent.GetComponentInChildren <Digger>(); this.setup = base.transform.parent.GetComponentInChildren <playerScriptSetup>(); this.animControl = base.GetComponent <playerAnimatorControl>(); this.player = base.transform.parent.GetComponent <PlayerInventory>(); this.armIK = base.transform.GetComponent <simpleIkSolver>(); Transform[] componentsInChildren = base.transform.root.GetComponentsInChildren <Transform>(); Transform[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { Transform transform = array[i]; if (transform.name == "hitTrigger") { this.mainWeaponCollider = transform.GetComponent <Collider>(); if (this.mainWeaponCollider) { this.mainWeaponCollider.enabled = false; } this.hitTriggerTr = transform.parent.transform; } if (transform.name == "stickHeld") { this.stickCollider1 = transform.GetComponentInChildren <BoxCollider>(); this.stickCollider2 = transform.GetComponentInChildren <CapsuleCollider>(); this.stickCollider2.enabled = false; } if (transform.name == "FireStick") { this.fireStickCollider1 = transform.GetComponentInChildren <BoxCollider>(); this.fireStickCollider2 = transform.GetComponentInChildren <CapsuleCollider>(); this.fireStickCollider2.enabled = false; } if (transform.name == "AxeHeld") { this.axeCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "AxeCraftedHeld") { this.axeCraftedCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "RockHeld") { this.rockCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "spearHeld") { this.spearCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "AxeHeldRusty") { this.axeRustyCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "AxePlaneHeld") { this.axePlaneCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "testCube") { } if (transform.name == "armHeld") { this.armHeldCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "legHeld") { this.legHeldCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "HeadHeld") { this.headHeldCollider = transform.GetComponentInChildren <CapsuleCollider>(); } if (transform.name == "ClubCraftedHeld") { this.clubCraftedHeldCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "ClubHeld") { this.clubHeldCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "SkullHeld") { this.skullHeldCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "stickHeldUpgraded") { this.stickUpgradedHeldCollider = transform.GetComponentInChildren <BoxCollider>(); this.stickUpgradedHeldCollider2 = transform.GetComponentInChildren <CapsuleCollider>(); } if (transform.name == "RockHeldUpgraded") { this.rockUpgradedHeldCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "AxeClimbingHeld") { this.climbingAxeCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "boneHeld") { this.boneHeldCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "turtleShellHeld") { this.turtleShellHeldCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "KatanaHeld") { this.katanaHeldCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "spearHeldUpgraded") { this.spearUpgradedCollider = transform.GetComponentInChildren <Collider>(); } if (transform.name == "TennisRacketHeld") { this.tennisRacketHeldCollider = transform.GetComponentInChildren <Collider>(); } } }
private void Awake() { base.GetComponent<Animation>()["turbulanceLight"].wrapMode = WrapMode.Loop; base.GetComponent<Animation>()["turbulanceLight"].speed = 1.2f; base.GetComponent<Animation>()["camShakePlane"].wrapMode = WrapMode.Loop; base.GetComponent<Animation>()["camShakePlane"].speed = 2.4f; base.GetComponent<Animation>()["camShakePlaneStart"].wrapMode = WrapMode.Once; base.GetComponent<Animation>()["camShakePlaneStart"].speed = 1.7f; base.GetComponent<Animation>()["camShakePlaneGround"].wrapMode = WrapMode.Loop; base.GetComponent<Animation>()["camShakePlaneGround"].speed = 3.5f; base.GetComponent<Animation>()["noShake"].wrapMode = WrapMode.Loop; base.GetComponent<Animation>()["camShakeFall"].wrapMode = WrapMode.Loop; base.GetComponent<Animation>()["camShakeFall"].speed = 2.5f; base.GetComponent<Animation>()["turbulanceLight"].layer = 1; base.GetComponent<Animation>()["camShakePlaneGround"].layer = 1; base.GetComponent<Animation>()["camShakePlane"].layer = 1; base.GetComponent<Animation>()["noShake"].layer = 1; base.GetComponent<Animation>()["camShakeFall"].layer = 1; this.setup = base.transform.root.GetComponentInChildren<playerScriptSetup>(); this.thisTr = base.transform; this.mouse1 = base.GetComponentInChildren<SimpleMouseRotator>(); this.mouse2 = base.transform.root.GetComponent<SimpleMouseRotator>(); this.camTr = this.mouse1.transform; }
private void Awake() { this.wallSetup = base.transform.GetComponentInChildren<wallTriggerSetup>(); this.setup = base.GetComponent<playerScriptSetup>(); this.buoyancy = base.transform.GetComponentInParent<Buoyancy>(); this.animEvents = base.transform.GetComponent<animEventsManager>(); this.planeCrashGo = GameObject.FindWithTag("planeCrash"); this.player = base.transform.GetComponentInParent<PlayerInventory>(); this.sledHinge = base.transform.GetComponentInChildren<HingeJoint>(); this.sledPivot = base.GetComponentInParent<Rigidbody>().transform.FindChild("sledPivot").transform; if (this.planeCrashGo) { this.setup.sceneInfo.planeCrash = this.planeCrashGo; this.planeCrash = this.planeCrashGo.transform; } else { GameObject gameObject = new GameObject(); this.planeCrash = gameObject.transform; this.planeCrash.position = base.transform.position; if (this.setup.sceneInfo != null) { this.setup.sceneInfo.planeCrash = this.planeCrash.gameObject; } } }