James Heavey / Mbed 2 deprecated EL17JH

Dependencies:   mbed

Life_Powerup/Life_Powerup.h

Committer:
jamesheavey
Date:
2019-05-08
Revision:
114:280903dd7e06
Child:
129:b47c28c7eaaf

File content as of revision 114:280903dd7e06:

#ifndef LIFE_POWERUP_H
#define LIFE_POWERUP_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Paddle.h"
#include "Bitmap.h"

/* Life_Powerup Class
@author James Heavey, University of Leeds
@brief Controls the Life_Powerup in the Breakout game
@date May 2019
*/

static int powerup_data[] = 
{
    0, 0, 0, 1, 1, 1, 0, 0, 0, 
    0, 1, 1, 0, 0, 0, 1, 1, 0, 
    0, 1, 0, 1, 0, 1, 0, 1, 0, 
    1, 0, 1, 1, 1, 1, 1, 0, 1, 
    1, 0, 1, 1, 1, 1, 1, 0, 1, 
    1, 0, 0, 1, 1, 1, 0, 0, 1, 
    0, 1, 0, 0, 1, 0, 0, 1, 0, 
    0, 1, 1, 0, 0, 0, 1, 1, 0, 
    0, 0, 0, 1, 1, 1, 0, 0, 0
};

class Life_Powerup
{

public:
    Life_Powerup();
    ~Life_Powerup();
    void init();
    void draw(N5110 &lcd);
    void update();
    /// accessors and mutators
    int get_x();
    int get_y();
    void set_posx(int x);
    void set_posy(int y);

private:
    int _speed_y;
    int _x;
    int _y;
};
#endif