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: Sprite/Sprite.h
- Revision:
- 3:b34685dbdb8d
- Parent:
- 2:b62e8be35a5d
- Child:
- 4:afbf3dd71403
--- a/Sprite/Sprite.h Tue Apr 02 10:45:44 2019 +0000 +++ b/Sprite/Sprite.h Tue Apr 02 12:40:31 2019 +0000 @@ -6,9 +6,10 @@ #include "Gamepad.h" #include "Bitmap.h" +#define GRAVITY 2 /*Sprite Class*/ -extern N5110 lcd; +//extern N5110 lcd; class Sprite { @@ -19,9 +20,9 @@ void render(N5110 &lcd); Vector2D getPos(); void setPos(Vector2D pos); - void update(Gamepad &pad); + void update(); -private: +protected: //Protected as will need to be accesible by inherited classes. Vector2D _pos; Vector2D _velocity; int _height;