private BasicObjective processBasicObjective(XmlNode node) { BasicObjectiveBuilder builder = new BasicObjectiveBuilder(); if (node ["descriptionCompleted"] != null) { builder.descriptionCompleted(node ["descriptionCompleted"].InnerText); } if (node ["message"] != null) { builder.message(node ["message"].InnerText); } foreach (XmlNode n in node["indicators"].ChildNodes) { ObjectiveIndicator oi = gom.getIndicator(n.InnerText); if (n.Attributes["chat"] != null && oi is PopupTriggerIndicator) { (oi as PopupTriggerIndicator).setMessage(n.Attributes["chat"].Value); } if (n.Attributes["chat"] != null && oi is PopupAnimatorTriggerIndicator) { (oi as PopupAnimatorTriggerIndicator).setMessage(n.Attributes["chat"].Value); } builder.indicator(oi); } return(builder.build(node["description"].InnerText)); }
private Quest buildSecondQuest() { Objective firstBasicObjective = new BasicObjectiveBuilder().indicator(gom.getIndicator("OI3")).build("Accede al marcador 3"); Objective secondBasicObjective = new BasicObjectiveBuilder().indicator(gom.getIndicator("OI4")).build("Accede al marcador 4"); Objective mainObjective = new ParallelObjectiveBuilder().objective(firstBasicObjective).objective(secondBasicObjective).completedObjectives(false).build("Probar objetivos paralelos"); return(new Quest(mainObjective, "Segunda Quest")); }
private Quest buildFirstQuest() { Objective firstBasicObjective = new BasicObjectiveBuilder().indicator(gom.getIndicator("OI1")).descriptionCompleted("Puerta abierta!").build("Abre la puerta"); Objective secondBasicObjective = new BasicObjectiveBuilder().indicator(gom.getIndicator("OI2")).build("Accede al marcador 2"); Objective mainObjective = new SecuentialObjectiveBuilder().objective(firstBasicObjective).objective(secondBasicObjective).build("Probar objetivos secuenciales"); return(new Quest(mainObjective, "Primera Quest")); }