Ejemplo n.º 1
0
 public FlightLoopTestPlugin(IXPlaneApi api)
     : base(api)
 {
     m_flightLoopHook = Api.Processing.RegisterFlightLoopHook(
         FlightLoopTime.FromSeconds(1.0f), OnFlightLoopHook
         );
 }
Ejemplo n.º 2
0
        public CommandTestPlugin(IXPlaneApi api)
            : base(api)
        {
            Api.Messages.MessageReceived += Messages_MessageReceived;

            m_headingUpCommand = Api.Commands.GetCommand("sim/autopilot/heading_up");
        }
Ejemplo n.º 3
0
 public MessageTestPlugin(IXPlaneApi api)
     : base(api)
 {
     Api.Messages.MessageReceived += Messages_MessageReceived;
     Api.Messages.PlaneCrashed    += Messages_PlaneCrashed;
     Api.Messages.PlaneLoaded     += Messages_PlaneLoaded;
 }
Ejemplo n.º 4
0
        public GraphicsTestPlugin(IXPlaneApi api)
        {
            m_api = api ?? throw new ArgumentNullException(nameof(api));

            m_api.Log.Log("GraphicsTestPlugin: Displaytest started");
            m_drawingLoopHook = m_api.Display.RegisterDrawHook(DrawingHook, XPLMDrawingPhase.xplm_Phase_Airplanes, 0);
            m_flightLoopHook  = m_api.Processing.RegisterFlightLoopHook(FlightLoopTime.FromCycles(1), SimLoaded);
            m_api.Log.Log("GraphicsTestPlugin: And now create a probe");
            m_probe = m_api.Scenery.CreateProbe();
            m_api.Log.Log("GraphicsTestPlugin: Probe created");
        }
Ejemplo n.º 5
0
        public GraphicsTestPlugin(IXPlaneApi api)
        {
            m_api = api ?? throw new ArgumentNullException(nameof(api));

            m_api.Log.Log("GraphicsTestPlugin: Displaytest started");
            m_drawingLoopHook     = m_api.Display.RegisterDrawHook(DrawingHook, XPDrawingPhase.Airplanes, 0);
            m_firstFlightLoopHook = m_api.Processing.RegisterFlightLoopHook(FlightLoopTime.FromCycles(1), SimLoaded);
            m_api.Data.RegisterDataAccessor("BSUB/CounterDataRef",
                                            getDataf: () => 3);
            m_api.Log.Log("GraphicsTestPlugin: And now create a probe");
            m_probe = m_api.Scenery.CreateProbe();
            m_api.Log.Log("GraphicsTestPlugin: Probe created");
        }
Ejemplo n.º 6
0
        public LoggerPlugin(IXPlaneApi api)
        {
            m_api = api ?? throw new ArgumentNullException(nameof(api));

            m_api.Log.Log("LoggerPlugin: Started");

            m_api.ConfigChanged += OnConfigurationChanged;

            m_flightLoopHook = m_api.Processing.RegisterFlightLoopHook(
                FlightLoopTime.FromSeconds(1.0f), OnFlightLoopHook
                );

            ReloadDataRefs();
        }
Ejemplo n.º 7
0
        public LoggerPlugin(IXPlaneApi api)
        {
            m_api = api ?? throw new ArgumentNullException("api");

            m_api.Log.Log("LoggerPlugin: Started");

            m_api.ConfigChanged += OnConfigurationChanged;

            m_api.Messages.MessageReceived += Messages_MessageReceived;
            m_api.Messages.PlaneCrashed    += Messages_PlaneCrashed;
            m_api.Messages.PlaneLoaded     += Messages_PlaneLoaded;

            m_flightLoopHook = m_api.Processing.RegisterFlightLoopHook(
                FlightLoopTime.FromSeconds(1.0f), OnFlightLoopHook
                );

            ReloadDataRefs();
        }
Ejemplo n.º 8
0
 public LoggingTestPlugin(IXPlaneApi api)
     : base(api)
 {
     Api.Messages.MessageReceived += Messages_MessageReceived;
 }
Ejemplo n.º 9
0
 public BoolArrayXorPlugin(IXPlaneApi api) : base(api)
 {
 }
Ejemplo n.º 10
0
 public TestPluginBase(IXPlaneApi api)
 {
     Api = api ?? throw new ArgumentNullException(nameof(api));
 }
Ejemplo n.º 11
0
 public DrawTestPlugin(IXPlaneApi api)
     : base(api)
 {
     m_drawBeforeHook = Api.Display.RegisterDrawHook(DrawBeforeHook, XPLMDrawingPhase.xplm_Phase_Airplanes, 1);
     m_drawAfterHook  = Api.Display.RegisterDrawHook(DrawAfterHook, XPLMDrawingPhase.xplm_Phase_Airplanes, 0);
 }
Ejemplo n.º 12
0
 public Plugin(IXPlaneApi api)
 {
     m_api = api ?? throw new ArgumentNullException(nameof(api));
 }
Ejemplo n.º 13
0
 public CustomDataRefPlugin(IXPlaneApi api) : base(api)
 {
 }
Ejemplo n.º 14
0
 public ByteArrayAdderPlugin(IXPlaneApi api) : base(api)
 {
 }
Ejemplo n.º 15
0
 public FloatAdderPlugin(IXPlaneApi api) : base(api)
 {
 }
Ejemplo n.º 16
0
 public ArduinoController(IXPlaneApi api)
 {
     m_api = api;
 }
Ejemplo n.º 17
0
 public StringAdderPlugin(IXPlaneApi api) : base(api)
 {
 }
Ejemplo n.º 18
0
 public IntArrayAdderPlugin(IXPlaneApi api) : base(api)
 {
 }