Example #1
0
        public IIOSystem CreatIoSystemFactory(IOSystemType currentIOType)
        {
            IOSystem.IOSystemFactory ioSystemFactory = new IOSystem.IOSystemFactory();
            IIOSystem currentIoSystem = ioSystemFactory.GetIOSystem(currentIOType);

            currentIoSystem.IOSystemActions = IOActions;
            return(currentIoSystem);
        }
Example #2
0
        public override IIOSystem GetIOSystem(IOSystemType currentIOSystemType)
        {
            switch (currentIOSystemType)
            {
            case IOSystemType.Touch:
                return(new TouchIOSystem());

            case IOSystemType.Joystick:
                return(new JoystickIOSystem());

            case IOSystemType.Keys:
                return(new KeysIOSystem());

            default:
                throw new ArgumentOutOfRangeException(nameof(currentIOSystemType), currentIOSystemType, null);
            }
        }
 public abstract IIOSystem GetIOSystem(IOSystemType currentIOSystemType);