// Update is called once per frame void Update() { shooting.cooldownTimer -= Time.deltaTime; //Shoot if (Input.GetKey(KeyCode.Space) && shooting.cooldownTimer <= 0) { shooting.Shoot(true); } //Quit game if (Input.GetKey(KeyCode.Escape) == true) { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex - 1); } //Level up if (xp >= xpForNextLevel) { LevelUp(); shooting.ChangeWeapon(); health.RegenHealthFull(); } }