Exemple #1
0
 public void Victory()
 {
     active = false;
     inGameUI.EndGame(true);
     scoreScreen.EndGame(true);
     pauseMenu.gameObject.SetActive(false);
 }
 public void EndGame(bool victory = false)
 {
     active = false;
     inGameUI.EndGame(victory);
     scoreScreen.EndGame(victory);
     pauseMenu.gameObject.SetActive(false);
 }
Exemple #3
0
    // Update is called once per frame
    void Update()
    {
        if (active)
        {
            if (score > 1000000)
            {
                active = false;
                pauseMenu.gameObject.SetActive(false);
                inGameUI.gameObject.SetActive(false);
                scoreScreen.EndGame(true);

                ps.loop = true;
                var em = ps.emission;
                em.rateOverTime = Mathf.Pow(clickRate, 0.5f);
                em.SetBursts(
                    new ParticleSystem.Burst[]
                    { });
                ps.Play();
            }
            foreach (RateChanger rc in rateChangers)
            {
                rc.Allow(score, CheckCost(rc.currentCost));
            }
            Score    += rate * Time.deltaTime;
            badScore += rate * Time.deltaTime;
        }
    }
Exemple #4
0
 void Next()
 {
     if (step > 0)
     {
         step--;
         if (step == 0)
         {
             inGameUI.EndGame(true);
             scoreScreen.EndGame(true);
             pauseMenu.gameObject.SetActive(false);
         }
     }
 }
Exemple #5
0
    // Update is called once per frame
    void Update()
    {
        bool win = true;

        foreach (var fa in fencedAreas)
        {
            if (!fa.full)
            {
                win = false;
                break;
            }
        }
        if (active && win)
        {
            active = false;
            Dog.Instance.Win();
            inGameUI.EndGame(true);
            scoreScreen.EndGame(true);
            pauseMenu.gameObject.SetActive(false);
        }
    }
Exemple #6
0
 public void Victory()
 {
     inGameUI.EndGame(true);
     scoreScreen.EndGame(true);
     pauseMenu.canvas.enabled = false;
 }