// Update is called once per frame void FixedUpdate() { barraProgresso.transform.localScale = new Vector3(statusBarra.PegarTamanhoBarra(progressoAtual, maxProgresso), barraProgresso.transform.localScale.y, barraProgresso.transform.localScale.z); txtProgresso.text = statusBarra.PegarPorcentagemBarra(progressoAtual, maxProgresso, 100) + "%"; if (progressoAtual <= maxProgresso && progressoAtual > 0) { progressoAtual -= Time.fixedDeltaTime; if (progressoAtual <= 156 && comecou == false) { ready.SetActive(true); Destroy(ready, 0.5f); comecou = true; } if (progressoAtual <= 155.3 && set1 == false) { set.SetActive(true); Destroy(set, 0.5f); set1 = true; } if (progressoAtual <= 154.5 && ready1 == false) { plant.SetActive(true); Destroy(plant, 0.9f); ready1 = true; } if (progressoAtual < 136 && startgame == false) { GetComponent <AudioSource>().clip = sons[0]; GetComponent <AudioSource>().Play(); startgame = true; } if (progressoAtual < 30 && finalWave == false) { waveApproch.SetActive(true); Destroy(waveApproch, 3); GetComponent <AudioSource>().clip = sons[1]; GetComponent <AudioSource>().Play(); finalWave = true; } if (progressoAtual < 23 && parar == false) { WaveFinal.SetActive(true); Destroy(WaveFinal, 3); parar = true; } } else { progressoAtual = 0; txtProgresso.text = 0.ToString() + "%"; } }
// Update is called once per frame void Update() { _StatusBarra = this.GetComponent <StatusBarra>(); barraDeProgresso.transform.localScale = new Vector3(_StatusBarra.PegarTamanhoBarra(ValorAtual, MaxProgresso), barraDeProgresso.transform.localScale.y, barraDeProgresso.transform.localScale.z); textoProgresso.text = _StatusBarra.PegarPorcentagemBarra(ValorAtual, MaxProgresso, 100) + "%"; if (ValorAtual < MaxProgresso) { ValorAtual = gerenciadordePontos.pontos; } else { textoProgresso.text = "2X"; } }
// Update is called once per frame void Update() { _barraDeProgesso.transform.localScale = new Vector3(_statusBarra.PegarTamanhoBarra(_progressoAtual, _maxProgresso), _barraDeProgesso.transform.localScale.y, _barraDeProgesso.transform.localScale.z); _textoProgresso.text = _statusBarra.PegarPorcentagemBarra(_progressoAtual, _maxProgresso, 100) + "%"; if (_progressoAtual < _maxProgresso) { _progressoAtual += Time.deltaTime * 25; } else { _textoProgresso.text = "100%"; Thread.Sleep(1500); SceneManager.LoadScene("Login"); } }
// Update is called once per frame void Update() { barraProgresso.transform.localScale = new Vector3(statusBarra.PegarTamanhoBarra(progressoAtual, maximoProgresso), barraProgresso.transform.localScale.y, barraProgresso.transform.localScale.z); textoProgesso.text = statusBarra.PegarPorcentagemBarra(progressoAtual, maximoProgresso, 100) + "%"; if (progressoAtual < maximoProgresso) { progressoAtual += Time.deltaTime * 6; if (progressoAtual > 52) { textoProgesso.color = UnityEngine.Color.white; } } else { textoProgesso.text = statusBarra.PegarPorcentagemBarra(progressoAtual, maximoProgresso, 100) + "% completo"; SceneManager.LoadScene("Tela Inicial"); } }