Ejemplo n.º 1
0
    //****************************************** LEVANTAR EL ARCHIVO XML  ****************************************
    public void loadDataFromLoadedFile()
    {
        XML_Parser xmlParser = new XML_Parser(this.configFile);

        clockMaxValue = xmlParser.getUniqueIntValueByTag ("starttime");
        //Debug.Log ("maxValue= "+clockMaxValue);
        pointsForNewWord = xmlParser.getUniqueIntValueByTag ("pointsNewLetters");

        foundAllWordsBonus = xmlParser.getUniqueIntValueByTag("foundAllWordsBonus");

        pointsData = xmlParser.getDataOfWords();

        //actualDictionaryPath= xmlParser.getPathOfDictionary(languageSelected);

        //dictionary = new Dictionary(actualDictionaryPath);

        dictionary = new Dictionary(languageSelected);

        //Debug.Log ("dict.size= "+dictionary.getSize().ToString());

        //Debug.Log ("Language: "+languageSelected);
    }
Ejemplo n.º 2
0
    private void init()
    {
        //CARGA LOS DATOS DESDE EL ARCHIVO DE CONFIGURACION (configFractions.xml -> se descarga al abrir el juego)
        configFile = CurrentConfig.getConfigFile(); //se le pide al script que guarda el xml de configuración abierto que le de el archivo

        XML_Parser xmlParser = new XML_Parser (configFile);

        //PUNTAJES A LERR -> por pasar de nivel, descuento por error, bonus por tiempo
        this.MISTAKE = xmlParser.getUniqueIntValueByTag("mistakePenalty");
        this.WINLEVEL = xmlParser.getUniqueIntValueByTag("winLevelPoints");
        this.BONUS = xmlParser.getUniqueIntValueByTag("levelBonusPoints");

        //Reloj (clock)
        this.clock.setMaxValue(xmlParser.getUniqueIntValueByTag("starttime"));
        this.clock.restartCount(); //le indica al clock que reinicie.

        buckets = GameObject.FindGameObjectsWithTag("Bucket");	//Se obtienen todos los buckets
        //print ("Buckets count: "+buckets.Length);

        checkButton = GameObject.FindGameObjectWithTag("CheckButton");	//Inicializo boton "check"
        CheckButton_Fractions chk = (CheckButton_Fractions)checkButton.gameObject.GetComponent(typeof(CheckButton_Fractions));
        chk.setGameCore(this);

        retryButton = GameObject.FindGameObjectWithTag("RetryButton");	//Inicializo boton retry
        RetryButton_Fractions rty = (RetryButton_Fractions)retryButton.gameObject.GetComponent(typeof(RetryButton_Fractions));
        rty.setGameCore(this);

        balls = GameObject.FindGameObjectsWithTag("Ball");	//Se obtienen todas las balls

        this.setCapacity(); //Setea la capacidad de cada bucket
    }