void Start() { PlayerReference pRef = GeneralVariables.playerRef; pm = GeneralVariables.player.GetComponent <PlayerMovement>(); wm = pRef.wm; dm = pRef.dm; pl = pm.GetComponent <PlayerLook>(); pv = pm.GetComponent <PlayerVitals>(); vc = GetComponent <VignettingC>(); wdof = GetComponent <WeaponDepthOfField>(); cb = pRef.cb; acs = pRef.acs; ia = pRef.ia; GetComponent <Camera>().fieldOfView = (float)GameSettings.settingsController.FOV; cachedTr.localPosition = Vector3.zero; lastUnAim = -0.25f; lastAim = -0.25f; lastShake = -100f; }
void Start() { base.isLocalPlayer = true; GeneralVariables.cachedSpectCam = cachedSpectCam; uic = GeneralVariables.uiController; rattleTSS = equipmentRattleSource.GetComponent <TimeScaleSound>(); healthBar = uic.healthBar; healthText = uic.healthText; shieldBar = uic.shieldBar; shieldText = uic.shieldText; staminaBar = uic.staminaBar; shieldTexture = uic.shieldTexture; ne = uic.guiCamera.GetComponent <NoiseEffect>(); disE = uic.guiCamera.GetComponent <DistortionEffect>(); staminaBackground = staminaBar.backgroundWidget; defStaminaBGCol = staminaBackground.color; bloodyScreen = uic.bloodyScreen; flickeringGUI = uic.flickeringPanels; sa = uic.screenAdjustment; bloodyScreen.material.color = DarkRef.SetAlpha(bloodyScreen.material.color, 0f); PlayerReference pr = GeneralVariables.playerRef; pm = GetComponent <PlayerMovement>(); playerLook = GetComponent <PlayerLook>(); vignetting = cam.GetComponent <VignettingC>(); damageBreathBoost = 0f; ne.grainIntensity = 0f; disE.baseIntensity = 0f; guiSizeModH = guiSizeModS = 1f; healthBar.value = 0f; shieldBar.value = 0f; breathFactor = 1f; hearingPenalty = 1f; standardFreq = 5000f; wm = pr.wm; wc = pr.wc; shieldAlpha = 0f; finalShAlpha = 0f; flickerIntensity = 0.5f; percent = 1f; shPercent = 1f; recovering = true; canSprint = true; initTime = Time.time; damageIDs = new List <byte>(); damageInflicted = new List <int>(); killerID = -1; headID = -1; lastWeaponID = -1; builtData = ""; //Initialize values. curHealth = maxHealth; curShield = maxShield; AntiHackSystem.ProtectInt("maxHealth", maxHealth); AntiHackSystem.ProtectInt("maxShield", maxShield); oldHealth = curHealth; oldShield = curShield; }