예제 #1
0
        public HudInterface(HudConfig hudConfig, HudConstants constants)
        {
            drawingUtils = new DrawingUtils();
            currentState = new HudState();

            ConfigureHud(hudConfig, constants);
        }
예제 #2
0
        private void ConfigureHud(HudConfig hudConfig, HudConstants constants)
        {
            showHud = hudConfig.ShowHud;

            hudElements = new List <HudElement>();

            if (hudConfig.ShowTarget)
            {
                hudElements.Add(new TargetElement(constants));
            }
            if (hudConfig.ShowBaseLine)
            {
                hudElements.Add(new BaseLineElement(constants));
            }
            if (hudConfig.ShowHeading)
            {
                hudElements.Add(new HeadingElement(constants));
            }
            if (hudConfig.ShowAltitude)
            {
                hudElements.Add(new AltitudeElement(constants));
            }
            if (hudConfig.ShowSpeed)
            {
                hudElements.Add(new SpeedElement(constants));
            }
            if (hudConfig.ShowBattery)
            {
                hudElements.Add(new BatteryElement(constants));
            }
        }
예제 #3
0
        public HudInterface(HudConfig hudConfig, HudConstants constants)
        {
            drawingUtils = new DrawingUtils();
            currentState = new HudState();

            ConfigureHud(hudConfig, constants);
        }
        private void ConfigureHud(HudConfig hudConfig, HudConstants constants)
        {
            showHud = hudConfig.ShowHud;

            hudElements = new List<HudElement>();

            if (hudConfig.ShowTarget)
                hudElements.Add(new TargetElement(constants));
            if (hudConfig.ShowBaseLine)
                hudElements.Add(new BaseLineElement(constants));
            if (hudConfig.ShowHeading)
                hudElements.Add(new HeadingElement(constants));
            if (hudConfig.ShowAltitude)
                hudElements.Add(new AltitudeElement(constants));
            if (hudConfig.ShowSpeed)
                hudElements.Add(new SpeedElement(constants));
            if (hudConfig.ShowBattery)
                hudElements.Add(new BatteryElement(constants));
        }
        private void InitializeHudInterface(HudConfig hudConfig)
        {
            HudConstants hudConstants = new HudConstants(droneControl.FrontCameraFieldOfViewDegrees);

            hudInterface = new HudInterface(hudConfig, hudConstants);
        }
예제 #6
0
        private void InitializeHudInterface()
        {
            _currentHudConfig = new HudConfig();

            HudConstants hudConstants = new HudConstants( _droneControl.FrontCameraFieldOfViewDegrees );

            _hudInterface = new HudInterface( _currentHudConfig, hudConstants );
        }