Elements used in the Balls and Things games for the RETRO.

Dependents:   RETRO_BallsAndPaddle RETRO_BallAndHoles

Paddle.h

Committer:
maxint
Date:
2015-02-06
Revision:
0:3d0db4e183ee

File content as of revision 0:3d0db4e183ee:

#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;
};