示例#1
0
        private Flag CreateFlagFromXmlNode(XElement node)
        {
            Flag newFlag = null;

            switch (node.Name.ToString())
            {
                case GoalFlag.Data_Node_Name:
                    newFlag = new GoalFlag();
                    break;
                case CheckpointFlag.Data_Node_Name:
                    newFlag = new CheckpointFlag((int)node.Attribute("index"));
                    break;

            }

            if (newFlag != null) { newFlag.ID = string.Concat(Serialized_Data_Identifier, _nextFlagID++); }

            return newFlag; ;
        }
示例#2
0
        private Flag CreateFlagFromXmlNode(XElement node)
        {
            Flag newFlag = null;

            switch (node.Name.ToString())
            {
            case GoalFlag.Data_Node_Name:
                newFlag = new GoalFlag();
                break;

            case CheckpointFlag.Data_Node_Name:
                newFlag = new CheckpointFlag((int)node.Attribute("index"));
                break;
            }

            if (newFlag != null)
            {
                newFlag.ID = string.Concat(Serialized_Data_Identifier, _nextFlagID++);
            }

            return(newFlag);;
        }