Пример #1
0
        public Program()
        {
            context = new ExecutionContext(this);

            iniParser.Clear();
            iniParser.TryParse(context.Reference.CustomData);


            subsystemManager        = new SubsystemManager(context);
            Runtime.UpdateFrequency = UpdateFrequency.Update1;

            IntelSubsystem IntelProvider = new IntelSubsystem();

            SensorSubsystem = new ScannerNetworkSubsystem(IntelProvider);

            subsystemManager.AddSubsystem("intel", IntelProvider);
            subsystemManager.AddSubsystem("sensor", SensorSubsystem);
            subsystemManager.AddSubsystem("turret", new TurretSubsystem(IntelProvider));
            subsystemManager.AddSubsystem("loader", new CombatLoaderSubsystem());
            subsystemManager.AddSubsystem("utility", new UtilitySubsystem());

            if (iniParser.Get("RoverMSM", "Hover").ToBoolean(false))
            {
                var helidrive = new HeliDriveSubsystem();
                subsystemManager.AddSubsystem("heli", helidrive);

                if (iniParser.Get("RoverMSM", "heliCAP").ToBoolean(false))
                {
                    subsystemManager.AddSubsystem("heliCAP", new HeliCombatAutopilotSubsystem(helidrive, IntelProvider));
                }
            }

            if (iniParser.Get("RoverMSM", "Landpedo").ToBoolean(false))
            {
                subsystemManager.AddSubsystem("landpedo", new LandpedoSubsystem(IntelProvider));
            }

            subsystemManager.DeserializeManager(Storage);
        }
Пример #2
0
 public HeliCombatAutopilotSubsystem(HeliDriveSubsystem drive, IIntelProvider intelProvider)
 {
     Drive         = drive;
     IntelProvider = intelProvider;
 }