Yudong Xiao
/
pokemon
This is test version of Pokemongo game. ELEC 2645 final project.
pokeball/PokeEngine.h@0:819c2d6a69ac, 2021-04-15 (annotated)
- Committer:
- shalwego
- Date:
- Thu Apr 15 15:35:12 2021 +0000
- Revision:
- 0:819c2d6a69ac
Issue about music playing
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shalwego | 0:819c2d6a69ac | 1 | #ifndef POKEENGINE_H |
shalwego | 0:819c2d6a69ac | 2 | #define POKEENGINE_H |
shalwego | 0:819c2d6a69ac | 3 | |
shalwego | 0:819c2d6a69ac | 4 | #include "mbed.h" |
shalwego | 0:819c2d6a69ac | 5 | #include "N5110.h" |
shalwego | 0:819c2d6a69ac | 6 | #include "Pokeball.h" |
shalwego | 0:819c2d6a69ac | 7 | #include "Pokemon.h" |
shalwego | 0:819c2d6a69ac | 8 | #include "Rocket.h" |
shalwego | 0:819c2d6a69ac | 9 | #include "Utils.h" |
shalwego | 0:819c2d6a69ac | 10 | |
shalwego | 0:819c2d6a69ac | 11 | class PokeEngine{ |
shalwego | 0:819c2d6a69ac | 12 | public: |
shalwego | 0:819c2d6a69ac | 13 | PokeEngine(); // pass in the lcd object from the main file |
shalwego | 0:819c2d6a69ac | 14 | void init(int ball_x, int ball_y, int ball_radius, int pokemong_x, int pokemon_y, int pokemon_size, int speed); |
shalwego | 0:819c2d6a69ac | 15 | void init_rocket(int x, int y,int size, int speed); |
shalwego | 0:819c2d6a69ac | 16 | int update(UserInput input); |
shalwego | 0:819c2d6a69ac | 17 | void draw(N5110 &lcd); |
shalwego | 0:819c2d6a69ac | 18 | void check_lives(int lives); |
shalwego | 0:819c2d6a69ac | 19 | int get_lives(); |
shalwego | 0:819c2d6a69ac | 20 | int get_score(); |
shalwego | 0:819c2d6a69ac | 21 | |
shalwego | 0:819c2d6a69ac | 22 | private: |
shalwego | 0:819c2d6a69ac | 23 | Pokeball _pokeball; |
shalwego | 0:819c2d6a69ac | 24 | Pokemon _pokemon; |
shalwego | 0:819c2d6a69ac | 25 | Rocket _rocket; |
shalwego | 0:819c2d6a69ac | 26 | void check_catching_collision(); |
shalwego | 0:819c2d6a69ac | 27 | void check_wall_collision(); |
shalwego | 0:819c2d6a69ac | 28 | void check_crash(); |
shalwego | 0:819c2d6a69ac | 29 | int _lives,_score; |
shalwego | 0:819c2d6a69ac | 30 | }; |
shalwego | 0:819c2d6a69ac | 31 | |
shalwego | 0:819c2d6a69ac | 32 | #endif |