Esempio n. 1
0
        public void Start()
        {
            if (this.started)
            {
                return;                 // Preventing accidents
            }
            Log.trace("Start");

            // We are in flight, it's guarantted that a Vessel is active now.
            this.LastActiveVessel = this.ActiveVessel = FlightGlobals.ActiveVessel;
            this.saveData();    // Guarantee a initial state.
            Log.dbg("Start with {0}", this.ActiveVessel.vesselName);
            Settings.LoadCurrentVesselConfig(this.ActiveVessel);
            plane.ChangeVessel(this.ActiveVessel);
            lander.ChangeVessel(this.ActiveVessel);
            this.checkVesselType();

            GameEvents.onVesselChange.Add(this.OnVesselChange);
            this.started = true;
        }
Esempio n. 2
0
 private void OnVesselChange(Vessel v)
 {
     plane.ChangeVessel(v);
     lander.ChangeVessel(v);
     Util.audio.Stop();
 }