Exemple #1
0
        public static XmlElement buildMilestoneDOM(Completable.Milestone milestone, string elementName = "milestone")
        {
            XmlElement milestoneNode = Writer.GetDoc().CreateElement(elementName);

            milestoneNode.SetAttribute("type", milestone.getType().ToString());

            if (milestone.getType() != Completable.Milestone.MilestoneType.CONDITION)
            {
                milestoneNode.SetAttribute("targetId", milestone.getId());
            }
            else
            {
                DOMWriterUtility.DOMWrite(milestoneNode, milestone.getConditions());
            }

            if (milestone.getProgress() >= 0)
            {
                milestoneNode.SetAttribute("progress", milestone.getProgress().ToString());
            }

            return(milestoneNode);
        }
 public float getProgress()
 {
     return(milestone.getProgress());
 }