Example #1
0
        void Awake()
        {
            this.Log("Awake");
            Instance = this;

            settings = new Settings();

            settingsWindow = new SettingsWindow(settings);
            helpWindow     = new HelpWindow();
            mainWindow     = new MainWindow(settings, settingsWindow, helpWindow);
            mainWindow.SetVisible(false);

            filename = IOUtils.GetFilePathFor(this.GetType(), "TacAtomicClock.cfg");
        }
        public override void OnStart(PartModule.StartState state)
        {
            this.Log("OnStart: " + state);
            base.OnStart(state);
            if (state != StartState.Editor && state != StartState.None)
            {
                clock = TacAtomicClockMain.Instance;

                clock.Observers += UpdateEvents;
                UpdateEvents(clock.IsVisible());

                part.OnJustAboutToBeDestroyed   += CleanUp;
                vessel.OnJustAboutToBeDestroyed += CleanUp;
            }
        }