AirsoftTimer software based on mbed
Dependencies: mbed TextLCD keypad
objectives/Objective.cpp
- Committer:
- sillevl
- Date:
- 2015-05-23
- Revision:
- 15:78116b7254d5
- Parent:
- 14:e0bfee0a5e66
- Child:
- 16:e8e96bf22df1
File content as of revision 15:78116b7254d5:
#include "Objective.h" Objective::Objective(Game* game){ this->game = game; Board* board = game->getBoard(); lcd = board->lcd; leds = board->leds; key = board->key; button = board->button; keyboard = board->keyboard; buzzer = board->buzzer; keyboard->attach(this,&Objective::keyEvent); status = WAITING; } Objective::Status Objective::getStatus(){ return status; } void Objective::start(){ while(status != COMPLETED){ run(); } } void Objective::complete(){ status = COMPLETED; } uint32_t Objective::keyEvent(uint32_t key){ // play key pressed sound ? // do nothing by default return 0; }