ELEC2645 (2018/19) / Mbed 2 deprecated el17ajf

Dependencies:   mbed

Fork of el17ajf by Angus Findlay

Committer:
el17ajf
Date:
Mon Apr 29 16:30:47 2019 +0000
Revision:
39:e128071a95b0
Parent:
31:69fedaa9b171
finished documenting all public methods;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el17ajf 18:24ce897024d0 1 #ifndef INPUT_H
el17ajf 18:24ce897024d0 2 #define INPUT_H
el17ajf 18:24ce897024d0 3
el17ajf 39:e128071a95b0 4 /**
el17ajf 39:e128071a95b0 5 * Input Namespace
el17ajf 39:e128071a95b0 6 * @brief Namespace providing functions to
el17ajf 39:e128071a95b0 7 * interface with SampledIn objects for each button used.
el17ajf 39:e128071a95b0 8 */
el17ajf 13:59e17cab320a 9 namespace Input {
el17ajf 39:e128071a95b0 10 /**
el17ajf 39:e128071a95b0 11 * @brief Button Enum represeting each button used for controling the game
el17ajf 39:e128071a95b0 12 * The directional button are labeled as follows on the pcb
el17ajf 39:e128071a95b0 13 * LEFT -> A
el17ajf 39:e128071a95b0 14 * RIGHT -> Y
el17ajf 39:e128071a95b0 15 * UP -> X
el17ajf 39:e128071a95b0 16 * DOWN -> B
el17ajf 39:e128071a95b0 17 */
el17ajf 22:0a474f074553 18 enum Button {LEFT, RIGHT, UP, DOWN, START};
el17ajf 39:e128071a95b0 19
el17ajf 39:e128071a95b0 20 /**
el17ajf 39:e128071a95b0 21 * @input A button from the Button enum
el17ajf 39:e128071a95b0 22 * @see Button
el17ajf 39:e128071a95b0 23 * @returns True if the button was hit this frame, else false
el17ajf 39:e128071a95b0 24 */
el17ajf 13:59e17cab320a 25 bool buttonHit(Button button);
el17ajf 39:e128071a95b0 26
el17ajf 39:e128071a95b0 27 /**
el17ajf 39:e128071a95b0 28 * @returns A random seed for the random generator,
el17ajf 39:e128071a95b0 29 * based on the Analogue Input from the joystick.
el17ajf 39:e128071a95b0 30 */
el17ajf 31:69fedaa9b171 31 int getSeed();
el17ajf 13:59e17cab320a 32 };
el17ajf 18:24ce897024d0 33 #endif