Inheritance: SSTUFieldManipulationData
Ejemplo n.º 1
0
        public static SSTUFieldManipulationData createNew(ConfigNode node, PartModule module)
        {
            SSTUFieldManipulationData fieldData;
            FieldType type;

            type = (FieldType)Enum.Parse(typeof(FieldType), node.GetStringValue("fieldType", "field"), true);
            switch (type)
            {
            case FieldType.FIELD:
                fieldData = new SSTUFieldData(node, module);
                break;

            case FieldType.EVENT:
                fieldData = new SSTUEventData(node, module);
                break;

            case FieldType.ACTION:
                fieldData = new SSTUActionData(node, module);
                break;

            default:
                fieldData = new SSTUFieldData(node, module);
                break;
            }
            return(fieldData);
        }
Ejemplo n.º 2
0
 public static SSTUFieldManipulationData createNew(ConfigNode node, PartModule module)
 {
     SSTUFieldManipulationData fieldData;
     FieldType type;
     type = (FieldType)Enum.Parse(typeof(FieldType), node.GetStringValue("fieldType", "field"), true);
     switch (type)
     {
         case FieldType.FIELD:
             fieldData = new SSTUFieldData(node, module);
             break;
         case FieldType.EVENT:
             fieldData = new SSTUEventData(node, module);
             break;
         case FieldType.ACTION:
             fieldData = new SSTUActionData(node, module);
             break;
         default:
             fieldData = new SSTUFieldData(node, module);
             break;
     }
     return fieldData;
 }