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.
Dependencies: mbed
Fork of el17dg by
game/game.h@21:0eb394495b8a, 2019-03-27 (annotated)
- Committer:
- Noximilien
- Date:
- Wed Mar 27 00:00:32 2019 +0000
- Revision:
- 21:0eb394495b8a
- Parent:
- 20:557e84189a57
- Child:
- 22:4dc3c95f2146
switched all enemies functions into the class system in a separate file. Created a struct for writing sprites more easily. Created a function that resets all values when the game is over. Separated collision, gameObject and constants into new files.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Noximilien | 3:10918b0f7a7d | 1 | #ifndef GAME_H |
Noximilien | 3:10918b0f7a7d | 2 | #define GAME_H |
Noximilien | 3:10918b0f7a7d | 3 | |
Noximilien | 21:0eb394495b8a | 4 | #include "geometry.h" |
Noximilien | 21:0eb394495b8a | 5 | |
Noximilien | 4:02c63aaa2df9 | 6 | class Game{ |
Noximilien | 4:02c63aaa2df9 | 7 | public: |
Noximilien | 21:0eb394495b8a | 8 | Game(); |
Noximilien | 4:02c63aaa2df9 | 9 | bool updateAndDraw(); |
Noximilien | 21:0eb394495b8a | 10 | void startNewGame(); |
Noximilien | 4:02c63aaa2df9 | 11 | private: |
Noximilien | 21:0eb394495b8a | 12 | void collideEnemiesAndBlasts(); |
Noximilien | 21:0eb394495b8a | 13 | void fireNewBlast(); |
Noximilien | 21:0eb394495b8a | 14 | void collideEnemiesBlastsAndPlayer(); |
Noximilien | 21:0eb394495b8a | 15 | void updateAndDrawBlasts(); |
Noximilien | 21:0eb394495b8a | 16 | void shipMovment(); |
Noximilien | 21:0eb394495b8a | 17 | |
Noximilien | 21:0eb394495b8a | 18 | CircleBounds player_bounds; |
Noximilien | 21:0eb394495b8a | 19 | CircleBounds blast_bounds; |
Noximilien | 3:10918b0f7a7d | 20 | }; |
Noximilien | 3:10918b0f7a7d | 21 | |
Noximilien | 3:10918b0f7a7d | 22 | |
Noximilien | 3:10918b0f7a7d | 23 | #endif |