void Update() { // if(restart) // { // if(Input.GetKeyDown (KeyCode.R)) // { // Application.LoadLevel(Application.loadedLevel); // } // } if (TimeCheck && dragme.checkFire()) { Time.timeScale = 0.2F; Time.fixedDeltaTime = 0.02F * Time.timeScale; } if (TimeCheck == false && dragme.checkFire()) { Time.timeScale = 1.0F; Time.fixedDeltaTime = 0.02F * Time.timeScale; } if (gameOver || bossOver) { //restartText.text = "Press 'R' for Restart"; restartButton.SetActive(true); restart = true; } }
void Update() { if (dragme.checkFire() && Time.time > nextFire) { nextFire = Time.time + fireRate; Instantiate(shot, shotspawn.position, shotspawn.rotation); audio.Play(); } }
void Update() { if (dragme.checkFire() && Time.time > nextFire) { nextFire = Time.time + fireRate; StartCoroutine(CreateShot()); audio.Play(); } rotateTheShip(); }