public void ResetVariaveis() { contandoPonto = false; pontuacaoCanvas.SetActive(false); ingredientesCanvas.SetActive(true); stateGame = StateGameMulti.INGREDIENTEFASE; actualIngrediente = 0; ingredienteCount = 0; mudaDesafio = true; desafiosLevel.Clear(); pontuacao = 300; countStars = 0; }
public void InputButtonGame(int indiceButton) { if (!TutorialScript.onTuto) { changeTexts = true; if (stateGame == StateGameMulti.INGREDIENTEFASE) { if (indiceButton == 6) { gameObject.SendMessage("AdiviVisit"); stateGame = StateGameMulti.RECEITAFASE; actualIngrediente = 0; trocaFader.SetTrigger("PassIN"); return; } if (indiceButton == 4 && actualIngrediente > 0) { actualIngrediente--; return; } if (actualIngrediente >= actualReceita.Ingredientes.Length - 1) { stateGame = StateGameMulti.RECEITAFASE; actualIngrediente = 0; trocaFader.SetTrigger("PassIN"); } else { actualIngrediente++; if (actualIngrediente > ingredienteCount) { mudaDesafio = true; ingredienteCount++; } } } else { if (stateGame == StateGameMulti.RECEITAFASE) { if (indiceButton == correctButton) { //Debug.Log(PlayerPrefs.GetString("PaisAtual")); if (PlayerPrefs.GetString("PaisAtual") == "Brasil") { if (currentRecipe == 0) { NPCSlot.sprite = Vaca1; } else { NPCSlot.sprite = Vaca2; } } else if (PlayerPrefs.GetString("PaisAtual") == "Mexico") { if (currentRecipe == 0) { NPCSlot.sprite = Mexico1; } else { NPCSlot.sprite = Mexico2; } } if (PlayerPrefs.GetInt("Personagem") == 2) { if (currentRecipe == 0) { PlayerSlot.sprite = Calopsita1; } else { PlayerSlot.sprite = Calopsita2; } } else { if (currentRecipe == 0) { PlayerSlot.sprite = Gato1; } else { PlayerSlot.sprite = Gato2; } } stateGame = StateGameMulti.PONTUACAOFASE; } else { if (indiceButton < 4) { anims.SetTrigger("WrongFeedback"); pontuacao -= 50; } } if (indiceButton == 4) { escondaFader.SetTrigger("EscondeIn"); stateGame = StateGameMulti.INGREDIENTEFASE; actualIngrediente = actualReceita.Ingredientes.Length - 1; } } } } }