// Use this for initialization protected override void Start() { string dialoguePath = Application.dataPath; dialoguePath = dialoguePath + "/Dialogos/" + ficheroDialogo; file = new FileStream(dialoguePath, FileMode.Open, FileAccess.Read); xmlSerializer = new XmlSerializer(typeof(Dialogo)); dialogo = (Dialogo)xmlSerializer.Deserialize(file); //Debug.Log(dialoguePath); }
void AldeanoEnter(Collider2D collision) { Aldeano aldeanoScript = collision.GetComponent <Aldeano>(); if (aldeanoScript == null) { Debug.Log("Aldeano Script = null"); } npcPicture = aldeanoScript.image; dialogo = aldeanoScript.Conversacion; ds = new DialogueSystem(dialogo.oradores, dialogo.conversaciones, dialogo.ordOradores); }