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.
Character/Character.h
- Committer:
- Albutt
- Date:
- 2020-05-26
- Revision:
- 17:c81c09625d92
- Parent:
- 12:c557b6c9b17a
- Child:
- 18:77394d8e6c3d
File content as of revision 17:c81c09625d92:
#include "mbed.h" #include "N5110.h" #include "Gamepad.h" /** Character Class @author Albert Tan Muligan, Student at University of Leeds @brief Controls the Character in a shooter game @date May 2020 */ class Character { public: Character(); ~Character(); /** * @brief Sets inital x and y * @param x and y @details x and y in pixels (max x = 84, y = 48) */ void init(int x,int y); void draw(N5110 &lcd); void update(Direction d); /** * @brief Resets x, y and direction to original(center, facing up) values */ void reset(); ///Direction accessor int get_direction(); ///X value accessor int get_x(); ///X value accessor int get_y(); private: int _x; int _y; int _speed; int _dir; };