Library that draws a basket on a Nokia N5110 LCD display and allows it to be moved left/right on the display using buttons or a joystick.
Dependents: Game_Controller_Project
Basket.h
- Committer:
- Nathanj94
- Date:
- 2017-03-31
- Revision:
- 6:2aec1ed2a75a
- Parent:
- 5:32421eb42841
- Child:
- 8:48c5adc809e1
File content as of revision 6:2aec1ed2a75a:
#ifndef BASKET_H #define BASKET_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" class Basket { public: Basket(); ~Basket(); void init(int y, int width); void draw(N5110 &lcd); void move(Direction d, float mag, Gamepad &pad); void add_score_1(); void add_score_2(); void add_score_5(); void add_score_10(); int get_score(); int get_x(); int get_y(); private: int y_ref; int x_ref; int basket_width; int stick_speed; int bumper_speed; int score; }; #endif