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.
Game/Game.h@3:b34685dbdb8d, 2019-04-02 (annotated)
- Committer:
- joshdavy
- Date:
- Tue Apr 02 12:40:31 2019 +0000
- Revision:
- 3:b34685dbdb8d
- Parent:
- 2:b62e8be35a5d
- Child:
- 6:2ca1516ec1e2
Moved player to its own inherited class to allow sprite to serve multiple puporses
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
joshdavy | 1:37802772843e | 1 | #ifndef GAME_H |
joshdavy | 1:37802772843e | 2 | #define GAME_H |
joshdavy | 1:37802772843e | 3 | |
joshdavy | 1:37802772843e | 4 | /*Game Class*/ |
joshdavy | 1:37802772843e | 5 | #include "mbed.h" |
joshdavy | 1:37802772843e | 6 | #include "N5110.h" |
joshdavy | 1:37802772843e | 7 | #include "Gamepad.h" |
joshdavy | 1:37802772843e | 8 | #include "Sprite.h" |
joshdavy | 3:b34685dbdb8d | 9 | #include "Player.h" |
joshdavy | 1:37802772843e | 10 | |
joshdavy | 2:b62e8be35a5d | 11 | |
joshdavy | 2:b62e8be35a5d | 12 | |
joshdavy | 1:37802772843e | 13 | class Game { |
joshdavy | 1:37802772843e | 14 | |
joshdavy | 1:37802772843e | 15 | public: |
joshdavy | 1:37802772843e | 16 | Game(); |
joshdavy | 1:37802772843e | 17 | ~Game(); |
joshdavy | 1:37802772843e | 18 | void read_input(Gamepad &pad); |
joshdavy | 1:37802772843e | 19 | void update(Gamepad &pad); |
joshdavy | 2:b62e8be35a5d | 20 | void draw(N5110 &lcd); |
joshdavy | 1:37802772843e | 21 | |
joshdavy | 1:37802772843e | 22 | private: |
joshdavy | 1:37802772843e | 23 | Direction _d; |
joshdavy | 1:37802772843e | 24 | float _mag; |
joshdavy | 3:b34685dbdb8d | 25 | Player _player; |
joshdavy | 1:37802772843e | 26 | }; |
joshdavy | 1:37802772843e | 27 | #endif |