AirsoftTimer software based on mbed

Dependencies:   mbed TextLCD keypad

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers WaitForKeyObjective.cpp Source File

WaitForKeyObjective.cpp

00001 
00002 #include "WaitForKeyObjective.h"
00003 #include "../games/Game.h"
00004 
00005 WaitForKeyObjective::WaitForKeyObjective(Game* game) : Objective(game){
00006     //keyboard->attach(this, &WaitForKeyObjective::buttonEvent);
00007 }
00008 
00009 void WaitForKeyObjective::run(){  
00010 
00011     
00012     //wait until completed
00013     while(getStatus() != COMPLETED){}
00014 }
00015 
00016 void WaitForKeyObjective::buttonEvent(char c){
00017     // complete objective if a button is pressed
00018     complete();
00019 }