public virtual void Start() { this.mainPlayer = PlayerScript.PlayerInstance.transform; this.mainPlayerHand = this.mainPlayer.Find("PlayerGraphics/Armature/Center/LowerBack/UpperBack/Shoulder_R/UpperArm_R/LowerArm_R/Hand_R"); this.root = RootScript.RootScriptInstance; this.rootShared = RootSharedScript.Instance; this.targetYRot = (double)this.transform.localRotation.eulerAngles.y >= 90.0 ? 90f : 270f; this.layerMask = (LayerMask)98560; this.rBody = (Rigidbody)this.gameObject.GetComponent(typeof(Rigidbody)); this.playerScript = (PlayerScript)this.mainPlayer.GetComponent(typeof(PlayerScript)); if (this.motorcycle) { RigidBodySlowMotion component = (RigidBodySlowMotion)this.GetComponent(typeof(RigidBodySlowMotion)); if ((UnityEngine.Object)component != (UnityEngine.Object)null) { component.enabled = false; } this.motorcycleYSpeed = 0.3f; } this.ranOffsetNr = UnityEngine.Random.value * 5f; }
public virtual void Awake() { RootSharedScript.Instance = this; int num = PlatformPlayerPrefs.GetInt("QualitySetting"); if (num != 0) { this.curVisualQualityLevel = num - 1; QualitySettings.SetQualityLevel(num - 1, true); QualitySettings.vSyncCount = PlatformPlayerPrefs.GetInt("VSync"); } else { this.curVisualQualityLevel = 1; QualitySettings.SetQualityLevel(1, true); QualitySettings.vSyncCount = PlatformPlayerPrefs.GetInt("VSync"); } if (!PlatformPlayerPrefs.HasKey("TargetFPS")) { PlatformPlayerPrefs.SetInt("TargetFPS", 2); } switch (PlatformPlayerPrefs.GetInt("TargetFPS")) { case 1: Application.targetFrameRate = 30; break; case 2: Application.targetFrameRate = 60; break; case 3: Application.targetFrameRate = 75; break; case 4: Application.targetFrameRate = 100; break; case 5: Application.targetFrameRate = 120; break; case 6: Application.targetFrameRate = 144; break; case 7: Application.targetFrameRate = 165; break; case 8: Application.targetFrameRate = 240; break; default: Application.targetFrameRate = 0; break; } GameObject gameObject = new GameObject(); gameObject.name = "NvidiaHighlights"; gameObject.AddComponent(typeof(NvidiaHighlightsScript)); if (this.GetArg("-neverChangeMouseCursor") == "1") { this.neverChangeMouseCursor = true; } if (this.GetArg("-SpeedrunnerLeaderboard") == "1") { this.speedrunnerLeaderboard = true; } if (!this.speedrunnerLeaderboard) { return; } PlatformManager.speedrunnerLeaderboard = true; }