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.
Player/Player.h@2:888634fff8ff, 2019-04-06 (annotated)
- Committer:
- ll16o2l
- Date:
- Sat Apr 06 12:08:39 2019 +0000
- Revision:
- 2:888634fff8ff
- Child:
- 3:aa82968b7a8e
Added stopwatch however still needs adjusting
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ll16o2l | 2:888634fff8ff | 1 | #ifndef PLAYER_H |
| ll16o2l | 2:888634fff8ff | 2 | #define PLAYER_H |
| ll16o2l | 2:888634fff8ff | 3 | |
| ll16o2l | 2:888634fff8ff | 4 | #include "mbed.h" |
| ll16o2l | 2:888634fff8ff | 5 | #include "N5110.h" |
| ll16o2l | 2:888634fff8ff | 6 | #include "Gamepad.h" |
| ll16o2l | 2:888634fff8ff | 7 | |
| ll16o2l | 2:888634fff8ff | 8 | class Player |
| ll16o2l | 2:888634fff8ff | 9 | { |
| ll16o2l | 2:888634fff8ff | 10 | public: |
| ll16o2l | 2:888634fff8ff | 11 | |
| ll16o2l | 2:888634fff8ff | 12 | Player(); |
| ll16o2l | 2:888634fff8ff | 13 | ~Player(); |
| ll16o2l | 2:888634fff8ff | 14 | void init(int player_height,int player_width); |
| ll16o2l | 2:888634fff8ff | 15 | void draw(N5110 &lcd); |
| ll16o2l | 2:888634fff8ff | 16 | void update(Direction d,float mag); |
| ll16o2l | 2:888634fff8ff | 17 | void add_score(); |
| ll16o2l | 2:888634fff8ff | 18 | int get_score(); |
| ll16o2l | 2:888634fff8ff | 19 | Vector2D get_pos(); |
| ll16o2l | 2:888634fff8ff | 20 | |
| ll16o2l | 2:888634fff8ff | 21 | private: |
| ll16o2l | 2:888634fff8ff | 22 | |
| ll16o2l | 2:888634fff8ff | 23 | int _player_height; |
| ll16o2l | 2:888634fff8ff | 24 | int _player_width; |
| ll16o2l | 2:888634fff8ff | 25 | int _x; |
| ll16o2l | 2:888634fff8ff | 26 | int _y; |
| ll16o2l | 2:888634fff8ff | 27 | int _speed; |
| ll16o2l | 2:888634fff8ff | 28 | int _score; |
| ll16o2l | 2:888634fff8ff | 29 | |
| ll16o2l | 2:888634fff8ff | 30 | }; |
| ll16o2l | 2:888634fff8ff | 31 | #endif |