当前位置: 首页>>代码示例>>C#>>正文


C# ConfigNode.GetBoolValue方法代码示例

本文整理汇总了C#中System.ConfigNode.GetBoolValue方法的典型用法代码示例。如果您正苦于以下问题:C# ConfigNode.GetBoolValue方法的具体用法?C# ConfigNode.GetBoolValue怎么用?C# ConfigNode.GetBoolValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.ConfigNode的用法示例。


在下文中一共展示了ConfigNode.GetBoolValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RenameEntry

 public RenameEntry(ConfigNode node)
 {
     moduleIndex = node.GetIntValue("moduleIndex");
     isAction = node.GetBoolValue("isAction");
     onTick = node.GetBoolValue("onTick");
     eventName = node.GetStringValue("eventName");
     newGuiName = node.GetStringValue("newGuiName");
 }
开发者ID:Joshg213,项目名称:SSTULabs,代码行数:8,代码来源:SSTUEventRename.cs

示例2: EngineMount

 public EngineMount(ConfigNode node)
 {
     name = node.GetStringValue("name");
     layoutNames = node.GetValues("layoutName");
     defaultDiameter = node.GetFloatValue("size", defaultDiameter);
     minDiameter = node.GetFloatValue("minSize", minDiameter);
     maxDiameter = node.GetFloatValue("maxSize", maxDiameter);
     engineSpacing = node.GetFloatValue("engineSpacing", engineSpacing);
     canAdjustSize = node.GetBoolValue("canAdjustSize", canAdjustSize);
     rotateEngineModels = node.GetBoolValues("rotateEngines");
     mountDefinition = SSTUEngineMountDefinition.getMountDefinition(name);
 }
开发者ID:SixDasher,项目名称:SSTULabs,代码行数:12,代码来源:EngineMount.cs

示例3: ModelData

 public ModelData(ConfigNode node)
 {
     name = node.GetStringValue("name", String.Empty);
     modelName = node.GetStringValue("modelName", String.Empty);
     techLimit = node.GetStringValue("techLimit", techLimit);
     height = node.GetFloatValue("height", height);
     volume = node.GetFloatValue("volume", volume);
     mass = node.GetFloatValue("mass", mass);
     cost = node.GetFloatValue("cost", cost);
     diameter = node.GetFloatValue("diameter", diameter);
     verticalOffset = node.GetFloatValue("verticalOffset", verticalOffset);
     invertModel = node.GetBoolValue("invertModel", invertModel);
 }
开发者ID:SixDasher,项目名称:SSTULabs,代码行数:13,代码来源:ModelData.cs

示例4: load

 //to be called on initial prefab part load; populate the instance with the default values from the input node
 public virtual void load(ConfigNode node, GameObject root)
 {
     fairingBase = new FairingContainer(root, cylinderSides, numOfSections, wallThickness);
     fairingBase.outsideUV = new UVArea(0.00390625f, 0.00390625f, 0.49609375f, 0.99609375f);
     fairingBase.insideUV = new UVArea(0.50390625f, 0.00390625f, 0.99609375f, 0.99609375f);
     fairingBase.edgesUV = new UVArea(0.00390625f, 0.00390625f, 0.49609375f, 0.99609375f);
     rotationOffset = node.GetVector3("rotationOffset", Vector3.zero);
     topY = node.GetFloatValue("topY", topY);
     bottomY = node.GetFloatValue("bottomY", bottomY);
     capSize = node.GetFloatValue("capSize", capSize);
     wallThickness = node.GetFloatValue("wallThickness", wallThickness);
     maxPanelHeight = node.GetFloatValue("maxPanelHeight", maxPanelHeight);
     cylinderSides = node.GetIntValue("cylinderSides", cylinderSides);
     numOfSections = node.GetIntValue("numOfSections", numOfSections);
     topRadius = node.GetFloatValue("topRadius", topRadius);
     bottomRadius = node.GetFloatValue("bottomRadius", bottomRadius);
     canAdjustTop = node.GetBoolValue("canAdjustTop", canAdjustTop);
     canAdjustBottom = node.GetBoolValue("canAdjustBottom", canAdjustBottom);
     removeMass = node.GetBoolValue("removeMass", removeMass);
     fairingJettisonMass = node.GetFloatValue("fairingJettisonMass", fairingJettisonMass);
     jettisonForce = node.GetFloatValue("jettisonForce", jettisonForce);
     jettisonDirection = node.GetVector3("jettisonDirection", jettisonDirection);
     fairingName = node.GetStringValue("name", fairingName);
 }
开发者ID:Joshg213,项目名称:SSTULabs,代码行数:25,代码来源:FairingData.cs

示例5: loadLookConstraint

 private void loadLookConstraint(ConfigNode node)
 {
     String transformName = node.GetStringValue("transformName");
     String targetName = node.GetStringValue("targetName");
     bool singleTarget = node.GetBoolValue("singleTarget", false);
     Transform[] movers = part.FindModelTransforms(transformName);
     Transform[] targets = part.FindModelTransforms(targetName);
     int len = movers.Length;
     SSTULookConstraint lookConst;
     for (int i = 0; i < len; i++)
     {
         lookConst = new SSTULookConstraint(node, movers[i], singleTarget ? targets[0] : targets[i], part);
         constraints.Add(lookConst);
     }
 }
开发者ID:SixDasher,项目名称:SSTULabs,代码行数:15,代码来源:SSTUModelConstraint.cs

示例6: ParachuteModelData

 public ParachuteModelData(ConfigNode node, Vector3 retracted, Vector3 semi, Vector3 full, int index, bool main)
 {
     name = node.GetStringValue("name");
     definition = SSTUParachuteDefinitions.getDefinition(name);
     modelName = definition.modelName;
     localPosition = node.GetVector3("localPosition");
     retractedUpVector = node.GetVector3("retractedUpVector");
     semiDeployedUpVector = node.GetVector3("semiDeployedUpVector");
     fullDeployedUpVector = node.GetVector3("fullDeployedUpVector");
     texture = node.GetStringValue("texture", texture);
     debug = node.GetBoolValue("debug");
     retractedScale = retracted;
     semiDeployedScale = semi;
     fullDeployedScale = full;
     this.index = index;
     this.main = main;
 }
开发者ID:shadowmage45,项目名称:SSTULabs,代码行数:17,代码来源:SSTUModularParachute.cs

示例7: EngineClusterLayoutMountData

 public EngineClusterLayoutMountData(ConfigNode node)
     : base(node)
 {
     canAdjustSize = node.GetBoolValue("canAdjustSize", canAdjustSize);
     initialDiameter = node.GetFloatValue("size", initialDiameter);
     minDiameter = node.GetFloatValue("minSize", initialDiameter);
     maxDiameter = node.GetFloatValue("maxSize", initialDiameter);
     rotateEngines = node.GetFloatValuesCSV("rotateEngines", new float[] {});
     engineSpacing = node.GetFloatValue("engineSpacing", engineSpacing);
     if (String.IsNullOrEmpty(modelDefinition.modelName)) { canAdjustSize = false; }
 }
开发者ID:shadowmage45,项目名称:SSTULabs,代码行数:11,代码来源:SSTUModularEngineCluster.cs

示例8: mergeNodes

        /// <summary>
        /// Merges global and local config nodes for an engine layout<para/>
        /// Local node values have priority if they are present; any non-specified local values are defaulted
        /// to the global value
        /// </summary>
        /// <param name="global"></param>
        /// <param name="local"></param>
        /// <returns></returns>
        private ConfigNode mergeNodes(ConfigNode global, ConfigNode local)
        {
            ConfigNode output = new ConfigNode("MOUNT");
            global.CopyTo(output);
            if (local.HasValue("canAdjustSize"))
            {
                output.RemoveValues("canAdjustSize");
                output.AddValue("canAdjustSize", local.GetBoolValue("canAdjustSize"));
            }
            if (local.HasValue("size"))
            {
                output.RemoveValues("size");
                output.AddValue("size", local.GetFloatValue("size"));
            }
            if (local.HasValue("minSize"))
            {
                output.RemoveValues("minSize");
                output.AddValue("minSize", local.GetFloatValue("minSize"));
            }
            if (local.HasValue("maxSize"))
            {
                output.RemoveValues("maxSize");
                output.AddValue("maxSize", local.GetFloatValue("maxSize"));
            }
            if (local.HasValue("engineSpacing"))
            {
                output.RemoveValues("engineSpacing");
                output.AddValue("engineSpacing", local.GetFloatValue("engineSpacing"));
            }
            if (local.HasValue("rotateEngines"))
            {
                output.RemoveValues("rotateEngines");
                output.AddValue("rotateEngines", local.GetStringValue("rotateEngines"));
            }

            return output;
        }
开发者ID:shadowmage45,项目名称:SSTULabs,代码行数:45,代码来源:SSTUModularEngineCluster.cs

示例9: MeshNodeData

 public MeshNodeData(ConfigNode inputNode, Part inputPart)
 {
     nodeName = inputNode.GetStringValue("name");
     if (String.IsNullOrEmpty(nodeName)) { MonoBehaviour.print("ERROR!! : Node name was null for meshswitch node data!!"); }
     nodeEnabled = inputNode.GetBoolValue("enabled", true);
     this.part = inputPart;
     if (inputNode.HasValue("position"))
     {
         nodePosition = inputNode.GetVector3("position");
     }
     else if (nodeEnabled == true)
     {
         MonoBehaviour.print("ERROR -- no position assigned, but node: " + nodeName + " is enabled for mesh switch");
         nodePosition = Vector3.zero;
     }
     if (inputNode.HasValue("orientation"))
     {
         nodeOrientation = inputNode.GetVector3("orientation");
     }
     else if (nodeEnabled == true)
     {
         MonoBehaviour.print("ERROR -- no orientation assigned, but node: " + nodeName + " is enabled for mesh switch");
         nodeOrientation = Vector3.zero;
     }
     nodeSize = inputNode.GetIntValue("size", 2);
 }
开发者ID:Joshg213,项目名称:SSTULabs,代码行数:26,代码来源:SSTUMeshSwitch.cs

示例10: SSTUEngineMountDefinition

        public SSTUEngineMountDefinition(ConfigNode node)
        {
            mountName = node.GetStringValue("name");
            modelName = node.GetStringValue("modelName");
            invertModel = node.GetBoolValue("invertModel", invertModel);
            singleModel = node.GetBoolValue("singleModel", singleModel);
            verticalOffset = node.GetFloatValue("verticalOffset");
            height = node.GetFloatValue("height", height);
            fairingDisabled = node.GetBoolValue("fairingDisabled", fairingDisabled);
            fairingTopOffset = node.GetFloatValue("fairingTopOffset");
            mountMass = node.GetFloatValue("mass", mountMass);
            defaultDiameter = node.GetFloatValue("defaultDiameter", defaultDiameter);
            volume = node.GetFloatValue("volume", volume);
            rcsVerticalPosition = node.GetFloatValue("rcsVerticalPosition", rcsVerticalPosition);
            rcsHorizontalPosition = node.GetFloatValue("rcsHorizontalPosition", rcsHorizontalPosition);
            rcsVerticalRotation = node.GetFloatValue("rcsVerticalRotation");
            rcsHorizontalRotation = node.GetFloatValue("rcsHorizontalRotation");

            if (node.HasValue("node"))
            {
                String[] vals = node.GetStringValues("node");
                foreach (String val in vals) { nodePositions.Add(new AttachNodeData(val)); }
                if (invertModel) { foreach (AttachNodeData data in nodePositions) { data.invert(); } }
            }
        }
开发者ID:SixDasher,项目名称:SSTULabs,代码行数:25,代码来源:EngineMount.cs

示例11: MountModelData

 public MountModelData(ConfigNode node)
     : base(node)
 {
     layoutNames = node.GetValues("layoutName");
     defaultDiameter = node.GetFloatValue("size", defaultDiameter);
     minDiameter = node.GetFloatValue("minSize", minDiameter);
     maxDiameter = node.GetFloatValue("maxSize", maxDiameter);
     engineSpacing = node.GetFloatValue("engineSpacing", engineSpacing);
     canAdjustSize = node.GetBoolValue("canAdjustSize", canAdjustSize);
     rotateEngineModels = node.GetBoolValues("rotateEngines");
     singleModel = node.GetBoolValue("singleModel", singleModel);
 }
开发者ID:Joshg213,项目名称:SSTULabs,代码行数:12,代码来源:ModelData.cs

示例12: ModelDefinition

        public ModelDefinition(ConfigNode node)
        {
            name = node.GetStringValue("name", String.Empty);
            modelName = node.GetStringValue("modelName", String.Empty);
            techLimit = node.GetStringValue("techLimit", techLimit);
            height = node.GetFloatValue("height", height);
            volume = node.GetFloatValue("volume", volume);
            mass = node.GetFloatValue("mass", mass);
            cost = node.GetFloatValue("cost", cost);
            diameter = node.GetFloatValue("diameter", diameter);
            verticalOffset = node.GetFloatValue("verticalOffset", verticalOffset);
            invertForTop = node.GetBoolValue("invertForTop", invertForTop);
            invertForBottom = node.GetBoolValue("invertForBottom", invertForBottom);

            fairingDisabled = node.GetBoolValue("fairingDisabled", fairingDisabled);
            fairingTopOffset = node.GetFloatValue("fairingTopOffset");
            rcsVerticalPosition = node.GetFloatValue("rcsVerticalPosition", rcsVerticalPosition);
            rcsHorizontalPosition = node.GetFloatValue("rcsHorizontalPosition", rcsHorizontalPosition);
            rcsVerticalRotation = node.GetFloatValue("rcsVerticalRotation", rcsVerticalRotation);
            rcsHorizontalRotation = node.GetFloatValue("rcsHorizontalRotation", rcsHorizontalRotation);

            defaultTextureSet = node.GetStringValue("defaultTextureSet");

            String[] attachNodeStrings = node.GetValues("node");
            int len = attachNodeStrings.Length;
            attachNodeData = new AttachNodeBaseData[len];
            for (int i = 0; i < len; i++)
            {
                attachNodeData[i] = new AttachNodeBaseData(attachNodeStrings[i]);
            }

            ConfigNode[] textureSetNodes = node.GetNodes("TEXTURESET");
            len = textureSetNodes.Length;
            textureSets = new ModelTextureSet[len];
            for (int i = 0; i < len; i++)
            {
                textureSets[i] = new ModelTextureSet(textureSetNodes[i]);
            }
            if (node.HasValue("surface"))
            {
                surfaceNode = new AttachNodeBaseData(node.GetStringValue("surface"));
            }
            else
            {
                String val = (diameter*0.5f) + ",0,0,1,0,0,2";
                surfaceNode = new AttachNodeBaseData(val);
            }
        }
开发者ID:Joshg213,项目名称:SSTULabs,代码行数:48,代码来源:ModelData.cs

示例13: SingleModelData

 public SingleModelData(ConfigNode node) : base(node)
 {
     name = node.GetStringValue("name", String.Empty);
     modelName = node.GetStringValue("modelName", String.Empty);
     height = node.GetFloatValue("height", height);
     volume = node.GetFloatValue("volume", volume);
     diameter = node.GetFloatValue("diameter", diameter);
     verticalOffset = node.GetFloatValue("verticalOffset", verticalOffset);
     invertModel = node.GetBoolValue("invertModel", invertModel);
 }
开发者ID:SixDasher,项目名称:SSTULabs,代码行数:10,代码来源:ModelData.cs

示例14: loadFromNode

 public ConverterResourceEntry loadFromNode(ConfigNode node)
 {
     resourceName = node.GetStringValue("resourceName");
     resourceAmount = node.GetFloatValue("resourceAmount");
     stopIfFull = node.GetBoolValue("stopIfFull");
     if (PartResourceLibrary.Instance.resourceDefinitions.Contains(resourceName))
     {
         resourceDefID = PartResourceLibrary.Instance.resourceDefinitions[resourceName].id;
     }
     else
     {
         MonoBehaviour.print("ERROR, could not locate resource definition for name: " + resourceName);
     }
     return this;
 }
开发者ID:SixDasher,项目名称:SSTULabs,代码行数:15,代码来源:ConverterRecipe.cs

示例15: SSTUEngineLayoutMountOption

 public SSTUEngineLayoutMountOption(ConfigNode node)
 {
     mountName = node.GetStringValue("name");
     upperStage = node.GetBoolValue("upperStage", upperStage);
     lowerStage = node.GetBoolValue("lowerStage", lowerStage);
 }
开发者ID:shadowmage45,项目名称:SSTULabs,代码行数:6,代码来源:SSTUEngineLayout.cs


注:本文中的System.ConfigNode.GetBoolValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。