Esempio n. 1
0
 public void TurretOverlayDeactive()
 {
     if (turretOverlay.activeSelf)
     {
         turretOverlay.SetActive(false);
         continueButton.SetActive(false);
         secondaryController.ReactivateMouse();
     }
 }
 public void Unpause()
 {
     if (paused)
     {
         Time.timeScale = 1.0f;
         paused         = false;
         secondaryController.ReactivateMouse();
     }
 }
Esempio n. 3
0
    public IEnumerator Turret()
    {
        turretDown = Time.time + powerupTime * 2;
        if (turretActive == false)
        {
            // power up
            secondaryController.DeactivateMouse();
            turretActive = true;
            powerupUI.Active(5);

            // wait for timer to run out
            yield return(new WaitWhile(() => turretDown > Time.time));

            // power down
            turretActive = false;
            secondaryController.ReactivateMouse();
            turret.transform.rotation = Quaternion.Euler(0.0f, 0.0f, 180.0f);
            powerupUI.Deactive(5);
        }
    }