![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
contains my game for the embedded systems project 2645
Dependencies: mbed FXOS8700CQQQ
GameEngine/RocketRacer.h@12:1d3b0218d8d0, 2019-03-30 (annotated)
- Committer:
- OmarAlebiary
- Date:
- Sat Mar 30 13:01:59 2019 +0000
- Revision:
- 12:1d3b0218d8d0
- Parent:
- 11:d4aaa959bb20
- Child:
- 13:cec06eb1d7b0
added led light on on proceeding each level
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
OmarAlebiary | 6:958376d55d70 | 1 | #ifndef ROCKETRACER_H |
OmarAlebiary | 6:958376d55d70 | 2 | #define ROCKETRACER_H |
OmarAlebiary | 6:958376d55d70 | 3 | |
OmarAlebiary | 6:958376d55d70 | 4 | #include "mbed.h" |
OmarAlebiary | 6:958376d55d70 | 5 | #include "N5110.h" |
OmarAlebiary | 9:edb39a8334ee | 6 | #include <cstdlib> |
OmarAlebiary | 9:edb39a8334ee | 7 | #include <ctime> |
OmarAlebiary | 6:958376d55d70 | 8 | #include "Gamepad.h" |
OmarAlebiary | 6:958376d55d70 | 9 | |
OmarAlebiary | 6:958376d55d70 | 10 | |
OmarAlebiary | 6:958376d55d70 | 11 | |
OmarAlebiary | 6:958376d55d70 | 12 | |
OmarAlebiary | 6:958376d55d70 | 13 | class RocketRacer{ |
OmarAlebiary | 6:958376d55d70 | 14 | |
OmarAlebiary | 6:958376d55d70 | 15 | public: |
OmarAlebiary | 12:1d3b0218d8d0 | 16 | Gamepad Mypad; |
OmarAlebiary | 12:1d3b0218d8d0 | 17 | void Main_Game_Display(N5110 &lcd); |
OmarAlebiary | 12:1d3b0218d8d0 | 18 | void End_Game(Gamepad &pad,N5110 &lcd); |
OmarAlebiary | 12:1d3b0218d8d0 | 19 | void Game_difficulty(Gamepad &pad); |
OmarAlebiary | 11:d4aaa959bb20 | 20 | void Generate_New_Enemy(); |
OmarAlebiary | 11:d4aaa959bb20 | 21 | void Check_Enemy_Dead(N5110 &lcd,Gamepad &pad); |
OmarAlebiary | 11:d4aaa959bb20 | 22 | void Joystick_position(Gamepad &pad); |
OmarAlebiary | 12:1d3b0218d8d0 | 23 | void Game_Loop(N5110 &lcd,Gamepad &pad); |
OmarAlebiary | 9:edb39a8334ee | 24 | void player_position(N5110 &lcd,char RocketPosition); |
OmarAlebiary | 9:edb39a8334ee | 25 | void enemy_position(N5110 &lcd,int place, int phase); |
OmarAlebiary | 9:edb39a8334ee | 26 | |
OmarAlebiary | 9:edb39a8334ee | 27 | |
OmarAlebiary | 9:edb39a8334ee | 28 | private: |
OmarAlebiary | 9:edb39a8334ee | 29 | //int enemy_0_pos, enemy_1_pos, enemy_phase; |
OmarAlebiary | 9:edb39a8334ee | 30 | // int Joy_X; |
OmarAlebiary | 9:edb39a8334ee | 31 | // int game_speed; |
OmarAlebiary | 9:edb39a8334ee | 32 | // int score; |
OmarAlebiary | 9:edb39a8334ee | 33 | // char POS; |
OmarAlebiary | 9:edb39a8334ee | 34 | // bool enemy_dead; |
OmarAlebiary | 9:edb39a8334ee | 35 | // bool control; |
OmarAlebiary | 6:958376d55d70 | 36 | |
OmarAlebiary | 6:958376d55d70 | 37 | |
OmarAlebiary | 6:958376d55d70 | 38 | |
OmarAlebiary | 10:7323785c071c | 39 | |
OmarAlebiary | 6:958376d55d70 | 40 | }; |
OmarAlebiary | 6:958376d55d70 | 41 | |
OmarAlebiary | 6:958376d55d70 | 42 | #endif |