Elements used in the Balls and Things games for the RETRO.
Dependents: RETRO_BallsAndPaddle RETRO_BallAndHoles
Diff: Paddle.h
- Revision:
- 0:3d0db4e183ee
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Paddle.h Fri Feb 06 09:51:06 2015 +0000 @@ -0,0 +1,37 @@ +#pragma once +#include "mbed.h" + +#include "Color565.h" +#include "font_OEM.h" +#include "LCD_ST7735.h" + +#include "Shapes.h" +#include "Vector.h" +#include "Physics.h" + +class Paddle +{ + public: + Paddle(LCD_ST7735* pDisp); + Paddle(LCD_ST7735* pDisp, int nX, int nY, int nWidth, int nHeight); + void initialize(int nX, int nY, int nWidth, int nHeight); + + + void move(Vector vDiff); + void checkBoundary(Rectangle rBoundary); + bool hasChanged(); + + void clearPrev(); + void clear(); + void draw(); + void redraw(bool fForceDraw=false); + + Position pos; + Dimension dim; + Vector vSpeed; + + + + private: + LCD_ST7735* pDisp; +}; \ No newline at end of file