Total Complexity | 0 |
Complexity/F | 0 |
Lines of Code | 75 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | //@flow |
||
3 | export default { |
||
4 | keyboardMapping: { |
||
5 | left: 37, |
||
6 | up: 38, |
||
7 | right: 39, |
||
8 | down: 40, |
||
9 | shift: 16, |
||
10 | enter: 13, |
||
11 | ctrl: 17, |
||
12 | escape: 27, |
||
13 | space: 32 |
||
14 | }, |
||
15 | mouseMapping: { |
||
16 | left: 0, |
||
17 | middle: 1, |
||
18 | right: 2 |
||
19 | }, |
||
20 | gamepadMapping: { |
||
21 | //xbox style |
||
22 | a: 0, |
||
23 | b: 1, |
||
24 | x: 2, |
||
25 | y: 3, |
||
26 | lb: 4, |
||
27 | rb: 5, |
||
28 | lt: 6, |
||
29 | rt: 7, |
||
30 | back: 8, |
||
31 | start: 9, |
||
32 | lthumb: 10, |
||
33 | rthumb: 11, |
||
34 | up: 12, |
||
35 | down: 13, |
||
36 | left: 14, |
||
37 | right: 15 |
||
38 | }, |
||
39 | axes: { |
||
40 | horizontal: [ |
||
41 | { |
||
42 | type: "keyboard", |
||
43 | positive: "right", |
||
44 | negative: "left" |
||
45 | }, |
||
46 | { type: "gamepad", axis: 0 } |
||
47 | ], |
||
48 | vertical: [ |
||
49 | { |
||
50 | type: "keyboard", |
||
51 | positive: "up", |
||
52 | negative: "down" |
||
53 | }, |
||
54 | { type: "gamepad", axis: 1 } |
||
55 | ], |
||
56 | wheel: [ |
||
57 | { |
||
58 | type: "mouse" |
||
59 | } |
||
60 | ] |
||
61 | }, |
||
62 | buttons: { |
||
63 | jump: [ |
||
64 | { type: "gamepad", button: "a" }, |
||
65 | { type: "keyboard", key: "space" } |
||
66 | ], |
||
67 | special: [ |
||
68 | { type: "gamepad", button: "b" }, |
||
69 | { type: "mouse", button: "right" } |
||
70 | ], |
||
71 | fire: [ |
||
72 | { type: "gamepad", button: "x" }, |
||
73 | { type: "keyboard", key: "ctrl" }, |
||
74 | { type: "mouse", button: "left" } |
||
75 | ] |
||
76 | } |
||
77 | }; |
||
78 |