Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (AbilitiesInput.EarthQuakeDestroy == true)
     {
         //AbilitiesInput.EarthQuakeDestroy = false;
         Destroy(gameObject);
         ShakeBehaviour.StopShake();
     }
     QuakeCollider.radius += GrowthRate * Time.deltaTime;                                                                                                            //öka storleken på jordbävning lite varje frame
 }
Ejemplo n.º 2
0
    void Update()
    {
        if (SecondScore < Time.time && AssistantBehaviour.Tutorial == false)
        {
            ScoreManaging.AddScore(1);
            SecondScore = Time.time + 1;
        }
        if (ProgressBar.fillAmount < 0.60f)
        {
            Bar.color = Stage01;
        }
        if (ProgressBar.fillAmount > 0.60f && ProgressBar.fillAmount < 0.75f)
        {
            Bar.color = Stage02;
        }
        if (ProgressBar.fillAmount > 0.75f)
        {
            Bar.color = Stage03;
        }

        if (DEVSWITCH == false)
        {
            ProgressBar.fillAmount = ProgressPool;
            if (ProgressPool >= 1)
            {
                DestoryDisasters();
                ShakeBehaviour.StopShake();
                PlayerWin      = false;
                GameEnd        = true;
                Time.timeScale = 0;
                StartCoroutine(switchScene());
            }
            if (ProgressPool < 0)
            {
                DestoryDisasters();
                ShakeBehaviour.StopShake();
                if (added == false)
                {
                    ScoreManaging.AddScore(5000);
                    added = true;
                }
                PlayerWin      = true;
                GameEnd        = true;
                Time.timeScale = 0;
                StartCoroutine(switchScene());
            }
        }
    }