15 lines
338 B
JavaScript
15 lines
338 B
JavaScript
|
import { Keyboard } from './inputs/keyboard';
|
||
|
import { Mouse } from './inputs/mouse';
|
||
|
export function createInput(key) {
|
||
|
switch (key) {
|
||
|
case 'keyboard':
|
||
|
return Keyboard;
|
||
|
break;
|
||
|
case 'mouse':
|
||
|
return Mouse;
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|