ELEC2645 (2018/19) / Mbed 2 deprecated el17ajf

Dependencies:   mbed

Fork of el17ajf by Angus Findlay

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?

UserRevisionLine numberNew 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 };