예제 #1
0
        private SecuentialObjective processSecuentialObjective(XmlNode node)
        {
            SecuentialObjectiveBuilder builder = new SecuentialObjectiveBuilder();

            if (node ["showCompleted"] != null)
            {
                builder.completedObjectives(Convert.ToBoolean(node ["showCompleted"].InnerText));
            }

            if (node ["showTitle"] != null)
            {
                builder.title(Convert.ToBoolean(node ["showTitle"].InnerText));
            }

            if (node ["showFuture"] != null)
            {
                builder.futureObjectives(Convert.ToBoolean(node ["showFuture"].InnerText));
            }

            if (node ["descriptionCompleted"] != null)
            {
                builder.descriptionCompleted(node ["descriptionCompleted"].InnerText);
            }

            foreach (XmlNode n in node["objectives"].ChildNodes)
            {
                builder.objective(processObjective(n));
            }

            return(builder.build(node["description"].InnerText));
        }
예제 #2
0
        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"));
        }