private void On_File_Changed(string filename) { lock (this) { Logging.Verbose("{0} has changed", filename); try_again: try { Func <string, Stream> load_delegate = (string module) => { var module_filename = Path.Combine(Path.GetDirectoryName(filename), module); var buffer = File.ReadAllBytes(module_filename); return(new MemoryStream(buffer)); }; Document document = XML_Parser.Load(Path.GetFileName(filename), load_delegate); DDL_Type_Analyzer.Compute_Sizes_And_Alignments(document); Process_CPP(document, filename); Process_CS(document, filename); } catch (FormatException exception) { Logging.Error("exception while processing {0}: {1}\n{2}", Path.GetFileName(filename), exception.Message, exception.StackTrace); } catch (IOException exception) { Logging.Warning("IO error while parsing {0}: {1}", filename, exception.Message); goto try_again; } } }
public void startPrix() { xml_parser = GetComponent<XML_Parser> (); prixSol = xml_parser.prixSol; prixMur = xml_parser.prixMur; prixLampeStand = xml_parser.prixLampeStand; prixLampeEnseigne = xml_parser.prixLampeEnseigne; prixReserve = xml_parser.prixReserve; prixEnseigne = xml_parser.prixEnseigne; matiereMurModel = new string[4]; matiereMurModel [0] = "Gainée coton"; matiereMurModel [1] = "Mélaminée blanc"; matiereMurModel [2] = "Mélaminée noir"; matiereMurModel [3] = "Personnalisée"; matiereMur = new string[3]; matiereReserveModel = new string[3]; matiereReserveModel [0] = "Gainée coton"; matiereReserveModel [1] = "Mélaminée blanc"; matiereReserveModel [2] = "Mélaminée noir"; matiereEnseigne = "Personnalisée"; }
public NPC() { xml_p = new XML_Parser(); name = ""; portrait = ""; Image = ""; Statement_ID = 0; Level = 0; Position = 0; }
public Statement() { xml_p = new XML_Parser(); owner_name = ""; statement_id = 0; text = ""; audio_file = ""; response_id = 0; choices = new Response[4]; }
// Use this for initialization void Start() { XML_Parser parser = new XML_Parser(); parser.Start_Parse(); for (int i = 0; i < Configuration.Contextual_Objects.Static_Objects.Count; ++i) { GameObject go = GameObject.Find(Configuration.Contextual_Objects.Static_Objects[i]); if (go) { objects_has_traitor.Add(go.AddComponent <Traitor>()); } else { Debug.Log("UGM_Error: GameObject name '" + Configuration.Contextual_Objects.Static_Objects[i] + "' cannot be found."); } } for (int i = 0; i < Configuration.Contextual_Objects.Trace_By_Tag_Name.Count; ++i) { try { GameObject[] gos = GameObject.FindGameObjectsWithTag(Configuration.Contextual_Objects.Trace_By_Tag_Name[i]); for (int j = 0; j < gos.Length; ++j) { objects_has_traitor.Add(gos[j].AddComponent <Traitor>()); } } catch (UnityException e) { Debug.Log("UGM_Error: Tag '" + Configuration.Contextual_Objects.Trace_By_Tag_Name[i] + "' is not defined."); Debug.Log(e.ToString()); } } for (int i = 0; i < objects_has_traitor.Count; ++i) { objects_has_traitor[i].controller = this; } touch_logger = gameObject.AddComponent <Touch_Logger>(); touch_logger.controller = this; }
// Use this for initialization void Start() { xm_p = new XML_Parser(); level_npc = new NPC[no_of_npcs]; level_npc = xm_p.LoadNpcs(current_level); /*foreach( NPC npc in level_npc){ Debug.Log("NPC LOOP " + npc.GetName()); }*/ // SetCurrentNPC(); //SetCurrentStatment(); // SetCurrentResponses(); }
//****************************************** 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); }
// Use this for initialization void Start() { _lightManager_Script = _lightManager.GetComponent<LightManager_Script> (); xml_parser = null; }
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 }