Exemplo n.º 1
0
        public void Update()
        {
            if (FrameUpdated != null)
            {
                FrameUpdated.Invoke();
            }

            if (FlightGlobals.ActiveVessel != null)
            {
                VesselSatellite vs = Satellites[FlightGlobals.ActiveVessel];
                if (vs != null)
                {
                    GetLocks();
                    if (vs.Master.FlightComputer != null &&
                        vs.Master.FlightComputer.InputAllowed)
                    {
                        foreach (KSPActionGroup g in GetActivatedGroup())
                        {
                            vs.Master.FlightComputer.Enqueue(ActionGroupCommand.Group(g));
                        }
                    }
                }
                else
                {
                    ReleaseLocks();
                }
            }
        }
Exemplo n.º 2
0
        private void OnFrameCaptured(object sender, FrameCapturedEventArgs e)
        {
            if (_currentFrame == null)
            {
                _currentFrame = e.Frame;
            }
            else
            {
                lock (_currentFrame)
                {
                    _currentFrame?.Dispose();
                    _currentFrame = e.Frame;
                }
            }

            lock (_encodings)
                _encodings.Clear();

            FrameUpdated?.Invoke(this, EventArgs.Empty);
        }
Exemplo n.º 3
0
 public void SendFrameUpdated(FrameEventArgs args)
 {
     CurrentFrame = args.CurrentFrame;
     IsPlaying    = true;
     FrameUpdated?.Invoke(this, args);
 }