コード例 #1
0
        private void Start()
        {
            available = (PSystemSetup.Instance.GetSpaceCenterFacility("TrackingStation").GetFacilityLevel() > 0);
            lastTime  = DateTime.Now;
            config    = PluginConfiguration.CreateForType <FlightPlan> ();
            config.load();

            UI = new UICore.UICore();
            UI.LoadConfig("GameData/FlightPlan/Skin/FlightPlan.cfg");

            winId    = GUIUtility.GetControlID(FocusType.Passive);
            winRect  = config.GetValue <Rect> (this.name, new Rect(0, 0, Screen.width / 2, Screen.height / 2));
            showAsUT = config.GetValue <bool> ("showAsUT", false);

            GameEvents.onGUIApplicationLauncherReady.Add(CreateLauncher);
            GameEvents.onHideUI.Add(OnHide);
            GameEvents.onShowUI.Add(OnUnHide);
            GameEvents.onGamePause.Add(OnHide);
            GameEvents.onGameUnpause.Add(OnUnHide);

            KACWrapper.InitKACWrapper();
            if (KACWrapper.APIReady)
            {
                KACWrapper.KAC.onAlarmStateChanged += KACWrapper_KAC_onAlarmStateChanged;
            }
        }
コード例 #2
0
 void LoadUICore()
 {
     if (UI == null)
     {
         UI = new UICore.UICore();
         UI.LoadConfig("GameData/FlightPlan/Skin/FlightPlan.cfg");
     }
 }