AirsoftTimer software based on mbed

Dependencies:   mbed TextLCD keypad

objectives/WaitForKeyObjective.cpp

Committer:
sillevl
Date:
2017-02-09
Revision:
27:f29805113454
Parent:
25:a26b2ec5ab72

File content as of revision 27:f29805113454:


#include "WaitForKeyObjective.h"
#include "../games/Game.h"

WaitForKeyObjective::WaitForKeyObjective(Game* game) : Objective(game){
    //keyboard->attach(this, &WaitForKeyObjective::buttonEvent);
}

void WaitForKeyObjective::run(){  

    
    //wait until completed
    while(getStatus() != COMPLETED){}
}

void WaitForKeyObjective::buttonEvent(char c){
    // complete objective if a button is pressed
    complete();
}