Kostadin Chakarov / Mbed 2 deprecated el17kec

Dependencies:   mbed

GameObject/GameObject.h

Committer:
kocemax
Date:
2019-04-10
Revision:
7:cd3cafda3dd4
Parent:
6:39bda45efeed
Child:
8:9b77eea95088

File content as of revision 7:cd3cafda3dd4:

#ifndef GAMEOBJECT_H
#define GAMEOBJECT_H

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

/** GameObject Class
@author Kostadin Chakarov, University of Leeds
@brief Draws and controls the objects in the Breakout game, which can either be static or non-static
@date April 2019
*/ 

class StaticGameObject
{
public:
    StaticGameObject();
    ~StaticGameObject();
    
    virtual void move();
    virtual void draw(N5110 &lcd);
    const Vector2D& getPos();
    int getW() { return w; };
    int getH() { return h; };
    
protected:
    int w, h;
    Vector2D pos;
};


class GameObject : public StaticGameObject
{
public:
    virtual void move();
    Vector2D& getVelocity() { return velocity; }
    
protected:
    Vector2D velocity;
    
};
#endif