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


C# StaticObject.update方法代码示例

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


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

示例1: SpinPreview

        public void SpinPreview(StaticObject soObject)
        {
            if (soObject == null || currPreview == null) return;

            float fRot = (float)soObject.getSetting("RotationAngle") + 0.1f;
            if (fRot > 360) fRot -= 360;

            soObject.setSetting("RotationAngle", fRot);
            soObject.update();
        }
开发者ID:Kerbas-ad-astra,项目名称:Kerbal-Konstructs_DEV,代码行数:10,代码来源:ModelInfo.cs

示例2: updateSelection

        public static void updateSelection(StaticObject obj)
        {
            selectedObject = obj;
            xPos = ((Vector3)obj.getSetting("RadialPosition")).x.ToString();
            yPos = ((Vector3)obj.getSetting("RadialPosition")).y.ToString();
            zPos = ((Vector3)obj.getSetting("RadialPosition")).z.ToString();
            xOri = ((Vector3)obj.getSetting("Orientation")).x.ToString();
            yOri = ((Vector3)obj.getSetting("Orientation")).y.ToString();
            zOri = ((Vector3)obj.getSetting("Orientation")).z.ToString();
            altitude = ((float)obj.getSetting("RadiusOffset")).ToString();
            rotation = ((float)obj.getSetting("RotationAngle")).ToString();
            visrange = ((float)obj.getSetting("VisibilityRange")).ToString();
            facType = ((string)obj.getSetting("FacilityType"));

            if (facType == null || facType == "" || facType == "None")
            {
                string DefaultFacType = (string)obj.model.getSetting("DefaultFacilityType");

                if (DefaultFacType == null || DefaultFacType == "None" || DefaultFacType == "")
                    facType = "None";
                else
                    facType = DefaultFacType;
            }

            sGroup = ((string)obj.getSetting("Group"));
            selectedObject.update();
        }
开发者ID:Kerbas-ad-astra,项目名称:Kerbal-Konstructs_DEV,代码行数:27,代码来源:EditorGUI.cs

示例3: updateSelection

 public static void updateSelection(StaticObject obj)
 {
     selectedObject = obj;
     xPos = ((Vector3)obj.getSetting("RadialPosition")).x.ToString();
     yPos = ((Vector3)obj.getSetting("RadialPosition")).y.ToString();
     zPos = ((Vector3)obj.getSetting("RadialPosition")).z.ToString();
     xOri = ((Vector3)obj.getSetting("Orientation")).x.ToString();
     yOri = ((Vector3)obj.getSetting("Orientation")).y.ToString();
     zOri = ((Vector3)obj.getSetting("Orientation")).z.ToString();
     altitude = ((float)obj.getSetting("RadiusOffset")).ToString();
     rotation = ((float)obj.getSetting("RotationAngle")).ToString();
     visrange = ((float)obj.getSetting("VisibilityRange")).ToString();
     facType = ((string)obj.getSetting("FacilityType"));
     sGroup = ((string)obj.getSetting("Group"));
     selectedObject.update();
 }
开发者ID:legacynl,项目名称:Kerbal-Konstructs_DEV,代码行数:16,代码来源:EditorGUI.cs

示例4: updateSelection

 public void updateSelection(StaticObject obj)
 {
     selectedObject = obj;
     xPos = ((Vector3)obj.getSetting("RadialPosition")).x.ToString();
     yPos = ((Vector3)obj.getSetting("RadialPosition")).y.ToString();
     zPos = ((Vector3)obj.getSetting("RadialPosition")).z.ToString();
     altitude = ((float)obj.getSetting("RadiusOffset")).ToString();
     rotation = ((float)obj.getSetting("RotationAngle")).ToString();
     visrange = ((float)obj.getSetting("VisibilityRange")).ToString();
     selectedObject.update();
 }
开发者ID:USAF21056,项目名称:Kerbal-Konstructs,代码行数:11,代码来源:EditorGUI.cs


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