using System; using System.Collections.Generic; using Domain.Input; namespace Domain { public class CustomInput { private readonly Dictionary _readers = new(); public CustomInput() { _readers.Add(typeof(CedillaReader), new CedillaReader()); } public void UpdateInput() { foreach (KeyValuePair reader in _readers) { reader.Value.UpdateInput(); } } public bool KeyDown(Type key) => _readers[key].KeyDown(); public bool KeyPressed(Type key) => _readers[key].KeyPressed(); public bool KeyUp(Type key) => _readers[key].KeyUp(); } }