コード例 #1
0
        void OnMouseDown()
        {
            if (!initialized)
            {
                Initialize();
            }

            if (HighLogic.LoadedScene == GameScenes.FLIGHT && !InputLockManager.IsLocked(ControlTypes.FLIGHTUIMODE))
            {
                FacilityManager.selectedInstance = facility.staticInstance;
                FacilityManager.instance.Open();
            }

            if (HighLogic.LoadedScene == GameScenes.SPACECENTER && !InputLockManager.IsLocked(ControlTypes.KSC_FACILITIES) && !(InputLockManager.GetControlLock("KK_KSC") == ControlTypes.UI))
            {
                staticInstance.HighlightObject(Color.clear);
                SpaceCenterAction();
            }
        }
コード例 #2
0
ファイル: LaunchSite.cs プロジェクト: yalov/Kerbal-Konstructs
        void OnMouseDown()
        {
            if (HighLogic.LoadedScene == GameScenes.SPACECENTER && !InputLockManager.IsLocked(ControlTypes.KSC_FACILITIES))
            {
                EditorFacility facility;
                staticInstance.HighlightObject(Color.clear);

                if (staticInstance.launchSite.LaunchSiteType == SiteType.VAB)
                {
                    facility = EditorFacility.VAB;
                }
                else
                {
                    facility = EditorFacility.SPH;
                }


                EditorDriver.StartupBehaviour = EditorDriver.StartupBehaviours.START_CLEAN;
                EditorDriver.StartEditor(facility);
            }
        }