private IEnumerator Start() { yield return(new WaitUntil(() => FindObjectOfType <DashUIComponent>() != null)); SetDashUIState(); cruiseController = GetComponent <CruiseController>(); }
public CruiseControllerTests() { _mockCruiseDataService = new Mock <ICruiseDataService>(); var mockedSalesUnitData = Enumerable.Empty <SalesUnitSalesData>(); _mockCruiseDataService.Setup(repo => repo.GetSalesUnitSalesData(It.IsAny <DateTime>(), It.IsAny <DateTime>())).Returns(mockedSalesUnitData); _sut = new CruiseController(_mockCruiseDataService.Object); }
private void findModules() { if (parent.ActiveVessel == null || parent.autopilot_module_lists.ContainsKey(parent.ActiveVessel) == false) { return; } if (parent.autopilot_module_lists[parent.ActiveVessel].ContainsKey(typeof(TopModuleManager))) { masterAP = parent.autopilot_module_lists[parent.ActiveVessel][typeof(TopModuleManager)] as TopModuleManager; } if (parent.autopilot_module_lists[parent.ActiveVessel].ContainsKey(typeof(StandardFlyByWire))) { fbwAP = parent.autopilot_module_lists[parent.ActiveVessel][typeof(StandardFlyByWire)] as StandardFlyByWire; } if (parent.autopilot_module_lists[parent.ActiveVessel].ContainsKey(typeof(CruiseController))) { ccAP = parent.autopilot_module_lists[parent.ActiveVessel][typeof(CruiseController)] as CruiseController; } if (parent.autopilot_module_lists[parent.ActiveVessel].ContainsKey(typeof(MouseDirector))) { dcAP = parent.autopilot_module_lists[parent.ActiveVessel][typeof(MouseDirector)] as MouseDirector; } if (parent.autopilot_module_lists[parent.ActiveVessel].ContainsKey(typeof(ProgradeThrustController))) { speedAP = parent.autopilot_module_lists[parent.ActiveVessel][typeof(ProgradeThrustController)] as ProgradeThrustController; } if (parent.autopilot_module_lists[parent.ActiveVessel].ContainsKey(typeof(PitchAngularVelocityController))) { pvc = parent.autopilot_module_lists[parent.ActiveVessel][typeof(PitchAngularVelocityController)] as PitchAngularVelocityController; } if (parent.autopilot_module_lists[parent.ActiveVessel].ContainsKey(typeof(YawAngularVelocityController))) { yvc = parent.autopilot_module_lists[parent.ActiveVessel][typeof(YawAngularVelocityController)] as YawAngularVelocityController; } }