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


C# ConfigNode.GetVector3方法代码示例

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


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

示例1: SSTULockedConstraint

 public SSTULockedConstraint(ConfigNode node, Transform mover, Transform target, Part part)
     : base(node, mover, target, part)
 {
     defaultLocalRotation = mover.localRotation;
     lookAxis = node.GetVector3("lookAxis", lookAxis);
     lockedAxis = node.GetVector3("lockedAxis", lockedAxis);
 }
开发者ID:shadowmage45,项目名称:SSTULabs,代码行数:7,代码来源:SSTUModelConstraint.cs

示例2: 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);
     uvMapName = node.GetStringValue("uvMap", uvMapName);
     UVMap uvMap = UVMap.GetUVMapGlobal(uvMapName);
     fairingBase.outsideUV = uvMap.getArea("outside");
     fairingBase.insideUV = uvMap.getArea("inside");
     fairingBase.edgesUV = uvMap.getArea("edges");
     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:shadowmage45,项目名称:SSTULabs,代码行数:27,代码来源:FairingData.cs

示例3: 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

示例4: 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

示例5: SolarPosition

 public SolarPosition(ConfigNode node)
 {
     position = node.GetVector3("position", Vector3.zero);
     rotation = node.GetVector3("rotation", Vector3.zero);
     scale = node.GetVector3("scale", Vector3.one);
 }
开发者ID:shadowmage45,项目名称:SSTULabs,代码行数:6,代码来源:SSTUModularStationCore.cs

示例6: ModelSwitchData

 public ModelSwitchData(ConfigNode node, Part owner, ModelSwitchGroup group)
 {
     name = node.GetStringValue("name");
     modelName = node.GetStringValue("modelName", name);
     groupName = node.GetStringValue("group", groupName);
     containerIndex = node.GetIntValue("containerIndex", 0);
     moduleIDs = node.GetIntValues("managedModuleID", new int[] { });
     localPosition = node.GetVector3("localPosition", Vector3.zero);
     localRotation = node.GetVector3("localRotation", Vector3.zero);
     scale = node.GetFloatValue("scale", scale);
     nodes = ModelNodeData.load(node.GetStringValues("node"));
     suppressNode = nodes.Length > 0;
     modelDefinition = SSTUModelData.getModelDefinition(modelName);
     if (modelDefinition == null) { throw new NullReferenceException("Could not locate model data for name: " + modelName + " :: " + name); }
     this.part = owner;
     this.group = group;
     this.group.add(this);
 }
开发者ID:shadowmage45,项目名称:SSTULabs,代码行数:18,代码来源:SSTUModelSwitch.cs


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