public void ToMain() { ControlSemilla.SumarSemilla(10, () => { SceneManager.LoadScene("main", LoadSceneMode.Single); }); }
public void ToMainMenuWithSemilla(int semillas) { ControlSemilla.SumarSemilla(semillas, () => { SceneManager.LoadScene("main", LoadSceneMode.Single); }); }
void Awake() { foreach (Transform child in miniJuegos.transform) { conteoMiniJuegos.Add(true); miniJuegosList.Add(child.gameObject); } instance = this; }
/// <summary> /// /// </summary> /// <param name="data"> /// X: isPlayerWinner? 1 : 0 /// Y: Prize recived for loosing /// Z: Prize recived for winning /// </param> public void ToMainMenuWithSemilla(Transform data) { if (data.localPosition.x == 0 || data.localPosition.x == 1) { ControlSemilla.SumarSemilla((int)(data.localPosition.x == 0 ? data.localPosition.y : data.localPosition.z), () => { SceneManager.LoadScene("main", LoadSceneMode.Single); }); } }
void OnTriggerEnter(Collider other) { if (other.tag == "Player") { if (ActividadRealizada == false) { // ctrlProgress.Actividadesrealizadas++; ActividadRealizada = true; controlSemilla = GameObject.Find("ControlSemilla").GetComponent <ControlSemilla>(); controlSemilla.SumarSemillaMinigame(gameObject, 5); logrosManager.LogrosSuma(1, 1); GameObject.FindObjectOfType <logrosManager>().CuboUi(); } imagenjuegoUi.SetActive(true); //gameObje0ct.SetActive(false); } }