public void GoToPage(int i) { SoundController = FindObjectOfType <soundController>(); PageActual += i; print(PageActual); btnPlay.interactable = false; nomeTemaTxt.text = "Selecione um tema"; nomeTemaTxt.color = Color.white; if (PageActual < 0) { PageActual = PanelThemes.Length - 1; print(PageActual); } if (PageActual >= PanelThemes.Length) { PageActual = 0; print(PageActual); } foreach (GameObject panel in PanelThemes) { panel.SetActive(false); } PanelThemes[PageActual].SetActive(true); }
// private LeDadosSeco LeDadosSeco; // private Question question; // Use this for initialization void Start() { soundController = FindObjectOfType(typeof(soundController)) as soundController; idTema = PlayerPrefs.GetInt("idTema"); idPergunta = 0; qtdQuestoes = Question.Pergunta.Length; //print(qtdQuestoes); //Os campos Perguntas e as respostas são carregados pela primeira vez com base no Array estático da Classe Question. pergunta.text = Question.Pergunta[0]; respostaA.text = Question.R1[0]; respostaB.text = Question.R2[0]; respostaC.text = Question.R3[0]; respostaD.text = Question.R4[0]; print("Ao Carregar =" + Question.Pergunta[0].ToString()); progressoBarra(); respondeu(); // btnProxima.interactable = true; // btnVoltar.interactable = false; }
void Start() { SC = FindObjectOfType(typeof(soundController)) as soundController; carregarPreferencias(); PainelPrincipal.SetActive(true); PainelOptions.SetActive(false); }
// Use this for initialization void Start() { soundController = FindObjectOfType(typeof(soundController)) as soundController; idTema = PlayerPrefs.GetInt("idTema"); notaMin1Estrela = PlayerPrefs.GetFloat("notaMin1Estrela"); notaMin2Estrela = PlayerPrefs.GetFloat("notaMin2Estrela"); nomeTema = PlayerPrefs.GetString("nomeTema"); temaTxt.text = nomeTema; paineis[0].SetActive(true); paineis[1].SetActive(false); idResponder = 0; montarListaPerguntas(); qtdPerguntasRespondidas = 0; totalPerguntas = perguntas.Length; qtdAcertos = 0; qtdErros = 0; atualizaInfo(); if (!jogarComTempo) { barraTempo.SetActive(false); } else { barraTempo.SetActive(true); } }
void Start() { SoundController = FindObjectOfType <soundController>(); LoadPreferences(); PanelMenu.SetActive(true); PanelSettings.SetActive(false); }
// Use this for initialization void Start() { temaScene = FindObjectOfType(typeof(temaScene)) as temaScene; idTemaTxt.text = idTema.ToString(); estrelas(); SC = FindObjectOfType(typeof(soundController)) as soundController; }
//其余元素的初始化,有些初始化只应该在剧本树建立完成之后做 //在这个方法里面初始化各种控制单元 void makeValueStart() { theTextController = this.GetComponent <textController> (); //文本控制单元 theChoiceController = this.GetComponent <choiceController>(); //分支选择控制单元 theUIController = this.GetComponent <UIController>(); //非文本显示的UI控制单元 //theMusicController = this.transform .GetComponentInChildren<MusicController> ();//音频比较特殊,需要父子关系,因为需要同时播放多个音效,音乐 theMusicController = this.GetComponent <AudioGetter>().GetMusicController(); theSoundController = this.transform.GetComponentsInChildren <soundController>()[0]; //两个sound,一个是真的音效,一个是语音音效 thePeopleSoundController = this.transform.GetComponentsInChildren <soundController>()[1]; //两个sound,一个是真的音效,一个是语音音效 theDataController = this.GetComponent <saveLoadController>(); }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } mainTheme = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <AudioSource> (); }
// Use this for initialization void Start() { // recebe o botão btnTema = GetComponent <Button>(); // btnPlay.interactable = false; infoTema.SetActive(false); estrela1.SetActive(false); estrela2.SetActive(false); estrela3.SetActive(false); txtInfoTema.text = ""; soundController = FindObjectOfType(typeof(soundController)) as soundController; }
// Use this for initialization void Start() { button = GetComponent <Button>(); temaScene = FindObjectOfType <temaScene>(); txtTema.text = idTema.ToString(); notaFinal = PlayerPrefs.GetFloat("notaFinal_" + idTema); print("notaFinal" + notaFinal + " - idtema" + idTema); estrelas(); VerificarNotaMinima(); SoundController = FindObjectOfType <soundController>(); }
// Use this for initialization void Start() { btnPlay.interactable = false; foreach (GameObject panel in PanelThemes) { panel.SetActive(false); } PanelThemes[0].SetActive(true); ButtonPreviousPage.gameObject.SetActive(PanelThemes.Length > 1); ButtonNextPage.gameObject.SetActive(PanelThemes.Length > 1); SoundController = FindObjectOfType <soundController>(); }
public void Start() { answerAn = GetComponentInChildren <AnswerAnimController>(); GameObject ui = GameObject.FindWithTag("UI"); uiSetLevel = ui.GetComponent <SetLevel>(); uiSetSceneColor = ui.GetComponent <SetSceneColor>(); exercB = GetComponent <ExerciseBlock>(); sound = GameObject.FindWithTag("Sound").GetComponent <soundController>(); level = GameObject.FindWithTag("DataController") .GetComponent <DataController>().currentLevel; StartLevel(); }
// Use this for initialization void Start() { SoundController = FindObjectOfType <soundController>(); idTema = PlayerPrefs.GetInt("idTema"); notaMinima1Estrelas = PlayerPrefs.GetInt("notaMinima1Estrelas"); notaMinima2Estrelas = PlayerPrefs.GetInt("notaMinima2Estrelas"); nomeTemaTxt.text = PlayerPrefs.GetString("nomeDoTema"); ListFinalQuestions = BuildListQuestions(); BuildUIQuestion(); MakeProgressionBar(); valorQuestao = 10 / (float)ListFinalQuestions.Count(); controleBarraTempo(); painelResponder.SetActive(true); painelResultado.SetActive(false); }
// Use this for initialization void Start() { SC = FindObjectOfType(typeof(soundController)) as soundController; fade = FindObjectOfType(typeof(fade)) as fade; //Seta página inicial = 0 idPaginaAtual = 0; //Desabilita todos os painéis foreach (GameObject b in paineltemas) { b.SetActive(false); } //Desabilita os botões de navegação foreach (GameObject b in btnPaginacao) { b.SetActive(false); } //Começa só com a primeira página paineltemas [idPaginaAtual].SetActive(true); atualizaBotoesNavegacao(); }
// Use this for initialization void Start() { idTema = PlayerPrefs.GetInt("idTema"); notaFinall = PlayerPrefs.GetInt("notaFinalTemp" + idTema.ToString()); acertos = PlayerPrefs.GetInt("acertosTemp" + idTema.ToString()); HinoSom = FindObjectOfType(typeof(soundController)) as soundController; estrela1.SetActive(false); estrela2.SetActive(false); estrela3.SetActive(false); // txtNota.text = notaFinall.ToString(); txtNota.text = acertos.ToString(); txtInfoTema.text = "Você acertou " + acertos.ToString() + " de 10 perguntas"; if (acertos == 10) { estrela1.SetActive(true); estrela2.SetActive(true); estrela3.SetActive(true); HinoSom.playHino(); } else if (acertos >= 7) { estrela1.SetActive(true); estrela2.SetActive(true); estrela3.SetActive(false); } else if (acertos >= 4) { estrela1.SetActive(true); estrela2.SetActive(false); estrela3.SetActive(false); } }
void Start() { SC = FindObjectOfType(typeof(soundController)) as soundController; fade = FindObjectOfType(typeof(fade)) as fade; }
// Use this for initialization void Start() { instance = this; }
// Use this for initialization void Start() { audio = GetComponent <AudioSource> (); instance = this; }
// Use this for initialization void Start() { instance = this; }
void Start() { SoundController = FindObjectOfType <soundController>(); }
// Use this for initialization void Start() { soundList = GetComponent<soundController>(); sound = GetComponent<AudioSource>(); }