예제 #1
0
    void Start()
    {
        if (!PlayerPrefs.HasKey("ConciertosRestantes"))
        {
            PlayerPrefs.SetInt("ConciertosRestantes", conciertosRestantes);
        }
        else
        {
            conciertosRestantes = PlayerPrefs.GetInt("ConciertosRestantes");
        }
        //DontDestroyOnLoad(gameObject);
        if (!PlayerPrefs.HasKey("Money"))
        {
            PlayerPrefs.SetInt("Money", 500);
        }
        else
        {
            currentMoney = PlayerPrefs.GetInt("Money");
        }
        artistaActual = null;
        instruments   = XMLManager.Deserializar <List <InstrumentData> >("listaInstrumentos");
        artistas      = XMLManager.Deserializar <List <ArtistaData> >("artistas");

        canciones = XMLManager.Deserializar <List <Cancion> >("nuevasCanciones");

        ciudades = XMLManager.Deserializar <List <Ciudad> >("ciudades");

        Invoke("manejarDatos", 0.2f);
        InvokeRepeating("timerConcierto", 0, 1);
        artistaActual = artistas[0];
    }