コード例 #1
0
        /// <summary>
        /// Updates the Window Strings to the new settings
        /// </summary>
        /// <param name="instance"></param>
        public static void updateSelection(StaticInstance instance)
        {
            selectedObject = instance;


            vis     = instance.VisibilityRange;
            facType = instance.FacilityType;

            if (facType == null || facType == "")
            {
                string DefaultFacType = instance.model.DefaultFacilityType;

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

            sGroup = instance.Group;
            selectedObject.update();
        }
コード例 #2
0
ファイル: ModelInfo.cs プロジェクト: Li0n-0/Kerbal-Konstructs
        public void SpinPreview(StaticInstance soObject)
        {
            if (soObject == null || currPreview == null)
            {
                return;
            }

            float fRot = ((soObject.RotationAngle + 0.1f) % 360);

            soObject.RotationAngle = fRot;
            soObject.update();
        }