public Processor( IProgressReporter progress, JsonSerializer serialiser, IConfigurationRepository configRepository, IDataProcessor processor, IInputFactory inputFactory) { if (serialiser == null) { throw new ArgumentNullException(nameof(serialiser)); } if (progress == null) { throw new ArgumentNullException(nameof(progress)); } if (configRepository == null) { throw new ArgumentNullException(nameof(configRepository)); } if (processor == null) { throw new ArgumentNullException(nameof(processor)); } this.serialiser = serialiser; this.configRepository = configRepository; this.processor = processor; this.inputFactory = inputFactory; this.progress = progress; }
public Application( ITextTransformer textTransformer, IInputFactory inputFactory, IOutputFactory outputFactory) { this.textTransformer = textTransformer ?? throw new ArgumentNullException(nameof(textTransformer)); this.inputFactory = inputFactory ?? throw new ArgumentNullException(nameof(inputFactory)); this.outputFactory = outputFactory ?? throw new ArgumentNullException(nameof(outputFactory)); }
public static IInputFactory getInstance() { if (instance == null) { instance = new InputFactory(); } return(instance); }
public World(GameSettings settings, IInputFactory inputFactory, IGraphicManager graphicManager) { iteration = 0; this.inputFactory = inputFactory; this.graphicManager = graphicManager; RainClouds = new List<RainCloud>(); Thunderstorms = new List<Thunderstorm>(); Clouds = new List<Cloud>(); Settings = settings; }
protected GameBase(Options options, IGamePlatformFactory gamePlatformFactory, IGraphicsFactory graphicsFactory, IInputFactory inputFactory) { _options = options; _gamePlatformFactory = gamePlatformFactory; GraphicsFactory = graphicsFactory; _inputFactory = inputFactory; _inputMapper = new InputMapper(_inputFactory); _gameLoop = _gamePlatformFactory.CreateGameLoop(); }
public World(GameSettings settings, IInputFactory inputFactory, IGraphicManager graphicManager) { iteration = 0; this.inputFactory = inputFactory; this.graphicManager = graphicManager; RainClouds = new List <RainCloud>(); Thunderstorms = new List <Thunderstorm>(); Clouds = new List <Cloud>(); Settings = settings; }
public InputMapper(IInputFactory inputFactory) { _inputFactory = inputFactory; _inputSources = new Dictionary <InputType, IInputSource>(); _buttonMap = new Dictionary <string, List <InputButton> >(32); _buttonValueMap = new Dictionary <InputButton, bool>(32); _axisMap = new Dictionary <string, Axis>(32); _axisValueMap = new Dictionary <Axis, float>(32); }
public App( ITrackService trackService, ITimeService timeService, IInputFactory inputFactory, SpecialLengthSettings specialLength, Sessions sessions) { _trackService = trackService; _timeService = timeService; _inputFactory = inputFactory; _specialLength = specialLength; _sessions = sessions; }
public RunnerWrapper( string filePath, EngineReference engineRef, IDisplayTarget displayTarget, ITextureFactory textureFactory, IInputFactory inputFactory) { this.filePath = filePath; this.engineRef = engineRef; this.displayTarget = displayTarget; this.inputFactory = inputFactory; this.runner = new Runner(textureFactory); }
public DemoGame( Options options, IGamePlatformFactory gamePlatformFactory, IGraphicsFactory graphicsFactory, IInputFactory inputFactory) : base(options, gamePlatformFactory, graphicsFactory, inputFactory) { _options = options; _windowResolution = _options.Graphics.WindowResolution; _renderResolution = _options.Graphics.RenderResolution; _textureFactory = graphicsFactory.CreateTextureFactory(); _camera = new Camera(new Vector3(0, 0, 5), _windowResolution.Width / (float)_windowResolution.Height); }
/// <summary> /// The PixelVisionEngine constructor requires a render target and an /// optional list of <paramref name="chips" /> to be properly configured. /// </summary> /// <param name="displayTarget"></param> /// <param name="inputFactory1"></param> /// <param name="chips"></param> /// <param name="name"></param> /// <tocexclude /> public PixelVisionEngine(IDisplayTarget displayTarget, IInputFactory inputFactory, string[] chips = null, string name = "Engine") { this.displayTarget = displayTarget; this.inputFactory = inputFactory; if (chips != null) { defaultChips = chips; } this.name = name; Init(); }
public MainViewModel(IInputFactory inputFactory) { IEnumerable <IInputFormViewModel> GetInputForms() { string[] descriptions = { "Enter Current Skill Points:", "Enter Required Skill Points:", "Enter Current Logdisks:", "Enter Logdisk Price:" }; int[] minValues = { 0, 1, 0, 0 }; int[] defaultValues = { 0, 1, 0, 100 }; int[] increments = { 5, 5, 25, 5 }; int[] maxValues = { 49, 50, 9_999_999, 100 }; Action <SkillStats, int>[] actions = { (skillStats, currentValue) => skillStats.InitialResearchPoint = currentValue, (skillStats, currentValue) => skillStats.FinalResearchPoint = currentValue, (skillStats, currentValue) => skillStats.LogdiskCount = currentValue, (skillStats, currentValue) => skillStats.LogdiskPrice = currentValue }; for (int index = 0; index < 4; ++index) { yield return(inputFactory.MakeInputForm(descriptions[index], minValues[index], defaultValues[index], increments[index], maxValues[index], actions[index])); } } InputForms = GetInputForms().ToArray(); Outputs = new Output[] { new Output(value => value, value => "Logdisk"), new Output(value => value * SkillStats.Instance.LogdiskPrice, value => { if (value < 10_000) { return("One Coin"); } if (value < 100_000) { return("Two Coins"); } return("Three Coins"); }) }.Select(inputFactory.MakeOutput).ToArray();
public KeyboardEmulatorService(ISendKeysService sendKeysService, IXInputService xinputService, IInputFactory inputFactory, IMappingService mappingService) { this.KeystrokeSubscription = xinputService.Keystrokes.Subscribe(keystroke => { if (this.IsEnabled) { if (keystroke.Flags == KeyStrokeFlags.KeyDown) { var key = mappingService.Map(keystroke.VirtualKey); if (key != null) { var inputs = inputFactory.GetKeyDownUp(key.Value); sendKeysService.SendKeys(inputs); } } } }); }
public App(IInputFactory inputFactory) { this.inputFactory = inputFactory; }
public InputFormViewModel(IInputFactory inputFactory) { _inputFactory = inputFactory; }
public InputManager(IInputFactory inputFactory) { this.inputFactory = inputFactory; }
public InputFactoryTests(InputFactoryFixture inputFactoryFixture) { _inputFactory = inputFactoryFixture.InputFactory; }
public InputService(IInputFactory inputFactory, IInputDispatcher inputDispatcher, IVFSLogger logger) { this.inputFactory = inputFactory; this.inputDispatcher = inputDispatcher; this.logger = logger; }