Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: GameObject/GameObject.h
- Revision:
- 6:39bda45efeed
- Child:
- 7:cd3cafda3dd4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GameObject/GameObject.h Mon Apr 08 09:14:33 2019 +0000 @@ -0,0 +1,41 @@ +#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& getballPos(); + int getW() { return w; }; + int getH() { return h; }; + +protected: + int w, h; + Vector2D ballpos; +}; + + +class GameObject : public StaticGameObject +{ +public: + virtual void move(); + +protected: + Vector2D velocity; + +}; +#endif \ No newline at end of file