Doxygen comments added
Dependencies: mbed Gamepad N5110
Bird/Bird.cpp
- Committer:
- rafeh
- Date:
- 2019-05-08
- Revision:
- 10:75de0f4da176
- Parent:
- 6:bc580b480ac8
- Child:
- 15:fc6b40fceb4f
File content as of revision 10:75de0f4da176:
#include "Bird.h" Bird::Bird() { } Bird::~Bird() { } void Bird::init(int xpos,int ypos) { _xpos=xpos; _ypos=ypos; } void Bird::draw(N5110 &lcd) { const int shape [6][6] = { 0,0,1,1,0,0, 0,1,0,1,1,0, 1,0,1,1,1,1, 1,1,1,1,1,0, 0,1,1,1,1,0, 0,0,0,0,0,0, }; lcd.drawSprite(_xpos,_ypos,6,6,(int*)shape); } int Bird::get_position(int y, Gamepad &pad) { if (pad.check_event(Gamepad::A_PRESSED) == true) { _y = y-14; } else { _y=y+2; } return _y; }