Example #1
0
        private ModulePebkacLesEscape GetEscapePart()
        {
            Debug.Log(string.Format("{0} ModulePebkacLesController.GetEscapePart", _myModTag));

            ModulePebkacLesEscape module = null;

            try
            {
                if (vessel != null)
                {
                    module = vessel.FindPartModulesImplementing <ModulePebkacLesEscape>().FirstOrDefault();
                }
            }
            catch (System.Exception x)
            {
                Debug.Log(string.Format("{0} ERROR: {1}", _myModTag, x.Message));
            }

            if (!module)
            {
                Debug.LogError(string.Format("{0} ERROR: Didn't find part on vessel with ModulePebkacLesEscape", _myModTag));
            }

            return(module);
        }
Example #2
0
        public override void OnStart(StartState state)
        {
            Debug.Log(string.Format("{0} ModulePebkacLesController.OnStart", _myModTag));

            _escape       = GetEscapePart();
            _jettison     = GetJettisonPart();
            _pitchControl = GetPitchControlPart();

            base.OnStart(state);
        }