AirsoftTimer software based on mbed
Dependencies: mbed TextLCD keypad
objectives/WaitForKeyObjective.cpp@24:f0989eca7469, 2015-05-24 (annotated)
- Committer:
- sillevl
- Date:
- Sun May 24 20:50:17 2015 +0000
- Revision:
- 24:f0989eca7469
- Parent:
- 19:2eba101d9c2c
- Child:
- 25:a26b2ec5ab72
solved circular include bug on Game and Objective classes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sillevl | 13:ece97a1108cc | 1 | |
sillevl | 13:ece97a1108cc | 2 | #include "WaitForKeyObjective.h" |
sillevl | 24:f0989eca7469 | 3 | #include "../games/Game.h" |
sillevl | 13:ece97a1108cc | 4 | |
sillevl | 14:e0bfee0a5e66 | 5 | WaitForKeyObjective::WaitForKeyObjective(Game* game) : Objective(game){ |
sillevl | 14:e0bfee0a5e66 | 6 | |
sillevl | 14:e0bfee0a5e66 | 7 | } |
sillevl | 14:e0bfee0a5e66 | 8 | |
sillevl | 13:ece97a1108cc | 9 | void WaitForKeyObjective::run(){ |
sillevl | 19:2eba101d9c2c | 10 | lcd->cls(); |
sillevl | 15:78116b7254d5 | 11 | lcd->printf("press any key to continue"); |
sillevl | 15:78116b7254d5 | 12 | } |
sillevl | 15:78116b7254d5 | 13 | |
sillevl | 16:e8e96bf22df1 | 14 | void WaitForKeyObjective::buttonEvent(char c){ |
sillevl | 16:e8e96bf22df1 | 15 | // complete objective if a button is pressed |
sillevl | 15:78116b7254d5 | 16 | complete(); |
sillevl | 13:ece97a1108cc | 17 | } |