// Use this for initialization void Start() { for (int i = 0; i < listOfEventNames.Length; i++) { luettavatXML = Resources.LoadAll("XML", typeof(TextAsset)); //Debug.Log ("Luettiin: " +luettavatXML.Length); foreach (TextAsset t in luettavatXML) { //Debug.Log ("Now parsing: " + t.name); tempEvent = soraParser.parseXMLToEvent (t.text); if (tempEvent.getEventType() == "starter") { starterEvents.Add (tempEvent); } else if (tempEvent.getEventType () == "continue") { eventDeck.Add (tempEvent); } else { fillerEvents.Add (tempEvent); } } } selectedStuff = farmStuff1; repsLeft = farmStuffCounter; //((FarmGame)GameObject.Find ("FarmGame").GetComponent ("FarmGame")).StartFarmGame (numberOfFarmers); //doingFarmStuff = true; }
private void InitializeEvents() { luettavatXML = Resources.LoadAll("XML", typeof(TextAsset)); //Debug.Log ("Luettiin: " +luettavatXML.Length); foreach (TextAsset t in luettavatXML) { //Debug.Log ("Now parsing: " + t.name); tempEvent = soraParser.parseXMLToEvent (t.text); if (tempEvent.getEventType() == "starter") { starterEvents.Add (tempEvent); } else if (tempEvent.getEventType () == "continue") { eventDeck.Add (tempEvent); } else { fillerEvents.Add (tempEvent); } } makingChoices = true; }