public void Back() { Destroy(settingsMenu); settingsMenu = null; MenuSettings.OpenMenu(); }
// Update is called once per frame void Update() { if (!isInputEnabled && !noclip) { kartScript.SetPedal(0); kartScript.SetSteer(0); return; } //controls float gas = Input.GetAxis("Vertical"); gas = Mathf.Clamp(gas, -1, 1); kartScript.SetPedal(gas); float steer = Input.GetAxis("Horizontal"); steer = Mathf.Clamp(steer, -1, 1); kartScript.SetSteer(steer); //weapons if (Input.GetButtonDown("Exit")) { MenuSettings.OpenMenu(); } if (Input.GetKeyDown(KeyCode.N)) { noclip = !noclip; if (noclip) { ToggleUI(); CmdToggleNoclip(); } } if (noclip) { return; } //debug if (debugMode) { if (Input.GetKeyDown(KeyCode.R)) { kartScript.Reset(0, Input.GetKey(KeyCode.LeftAlt)); } if (Input.GetKeyDown(KeyCode.T)) { kartScript.BackToTrack(); } if (Input.GetKeyDown(KeyCode.K)) { kartScript.pw.GetStatusEffectHandler().AddStatusEffect(StatusEffectHandler.EffectType.HIT); } if (Input.GetKeyDown(KeyCode.O)) { ToggleUI(); } } }