Ejemplo n.º 1
0
        public static Task_PlayObject Load(SecurityElement element)
        {
            Task_PlayObject task_PlayObjectObject = new Task_PlayObject();

            task_PlayObjectObject.ID           = StrParser.ParseDecInt(StrParser.ParseStr(element.Attribute("ID"), ""), -1);
            task_PlayObjectObject.Chapter      = StrParser.ParseDecInt(StrParser.ParseStr(element.Attribute("Chapter"), ""), -1);
            task_PlayObjectObject.Chapter_Name = StrParser.ParseStr(element.Attribute("Chapter_Name"), "");
            task_PlayObjectObject.CG_Type      = StrParser.ParseDecInt(StrParser.ParseStr(element.Attribute("CG_Type"), ""), -1);
            string Condition = StrParser.ParseStr(element.Attribute("Task_ID"), "");

            if ("" != Condition && null != Condition)
            {
                string[] vecs = Condition.Split('|');
                task_PlayObjectObject._task_IDList.Clear();
                foreach (string Conditionstring in vecs)
                {
                    int temp = StrParser.ParseDecInt(Conditionstring, -1);
                    task_PlayObjectObject._task_IDList.Add(temp);
                }
            }
            task_PlayObjectObject.Task_Title  = StrParser.ParseStr(element.Attribute("Task_Title"), "");
            task_PlayObjectObject._is_Feature = StrParser.ParseDecInt(StrParser.ParseStr(element.Attribute("Is_Feature"), ""), -1);
            task_PlayObjectObject._is_branch  = StrParser.ParseDecInt(StrParser.ParseStr(element.Attribute("Is_branch"), ""), -1);

//
            return(task_PlayObjectObject);
        }
Ejemplo n.º 2
0
    public override bool Load(SecurityElement element)
    {
        if (element.Tag != "Items")
        {
            return(false);
        }

        if (element.Children != null)
        {
            foreach (SecurityElement childrenElement in element.Children)
            {
                Task_PlayObject task_PlayObjectObject = Task_PlayObject.Load(childrenElement);

                if (!_task_PlayObjectObjectDict.ContainsKey(task_PlayObjectObject.ID))
                {
                    _task_PlayObjectObjectDict[task_PlayObjectObject.ID] = task_PlayObjectObject;
                }
            }
        }
        return(true);
    }