Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of el17ajf by
Input/Input.h@12:beb0d7632531, 2019-03-17 (annotated)
- Committer:
- el17ajf
- Date:
- Sun Mar 17 12:14:56 2019 +0000
- Revision:
- 12:beb0d7632531
- Parent:
- 9:3a7776a29a11
- Child:
- 13:59e17cab320a
changed location of static values
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el17ajf | 12:beb0d7632531 | 1 | #include "Gamepad.h" |
el17ajf | 12:beb0d7632531 | 2 | |
el17ajf | 3:a1b058ff66c2 | 3 | class Input { |
el17ajf | 3:a1b058ff66c2 | 4 | public: |
el17ajf | 12:beb0d7632531 | 5 | static const int NUMBER_OF_BUTTONS; |
el17ajf | 9:3a7776a29a11 | 6 | enum Button {LEFT, RIGHT, UP, DOWN}; |
el17ajf | 9:3a7776a29a11 | 7 | enum State {RELEASED, RELEASED_FRAME, HIT_FRAME, HELD}; |
el17ajf | 9:3a7776a29a11 | 8 | static void init(); |
el17ajf | 9:3a7776a29a11 | 9 | static void deinit(); |
el17ajf | 5:3efbdcb3efaf | 10 | static void update(); |
el17ajf | 9:3a7776a29a11 | 11 | static bool buttonHit(Button button); |
el17ajf | 9:3a7776a29a11 | 12 | static bool buttonHeld(Button button); |
el17ajf | 9:3a7776a29a11 | 13 | private: |
el17ajf | 12:beb0d7632531 | 14 | static State states[4]; |
el17ajf | 12:beb0d7632531 | 15 | static Gamepad * gamepad; |
el17ajf | 3:a1b058ff66c2 | 16 | }; |