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.
Sprite/Sprite.h
- Committer:
- joshdavy
- Date:
- 2019-04-06
- Revision:
- 4:afbf3dd71403
- Parent:
- 3:b34685dbdb8d
- Child:
- 8:21b6d4dbce44
File content as of revision 4:afbf3dd71403:
#ifndef SPRITE_H #define SPRITE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Bitmap.h" #define GRAVITY 2 /*Sprite Class*/ //extern N5110 lcd; class Sprite { public: Sprite(); ~Sprite(); void init(int height,int width, int * bitmap,Vector2D pos); void render(N5110 &lcd); Vector2D getPos(); void setPos(Vector2D pos); void update(); void flip(); void setBitmap(int * bitmap); protected: //Protected as will need to be accesible by inherited classes. Vector2D _pos; Vector2D _velocity; int _height; int _width; int * _bitmap; }; #endif