本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}