public override void OnStart(StartState state) { Debug.Log(string.Format("{0} ModulePebkacLesController.OnStart", _myModTag)); _escape = GetEscapePart(); _jettison = GetJettisonPart(); _pitchControl = GetPitchControlPart(); base.OnStart(state); }
private ModulePebkacLesPitchControl GetPitchControlPart() { Debug.Log(string.Format("{0} ModulePebkacLesController.GetPitchControlPart", _myModTag)); ModulePebkacLesPitchControl module = null; try { if (vessel != null) { module = vessel.FindPartModulesImplementing <ModulePebkacLesPitchControl>().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 ModulePebkacLesPitchControl", _myModTag)); } return(module); }