勇帜 周
/
2645_Final_project_1
bird
bird/bird.cpp
- Committer:
- 1013373474
- Date:
- 2019-05-03
- Revision:
- 0:3887ebee1b37
- Child:
- 1:8672e52115e3
File content as of revision 0:3887ebee1b37:
#include "bird.h" void bird::init() { _y = 20; } void bird::draw(N5110 &lcd) { lcd.drawRect(30,_y,2,2,FILL_BLACK); _y += 3; } void bird::check(Gamepad &pad) { while (pad.check_event(Gamepad::A_PRESSED) == true) { _y -= 6; } } Data bird::get_data() { _data.y = _y; return _data; }