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();
        }
        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();
        }
 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
0
 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();
 }