Yudong Xiao
/
pokemon
This is test version of Pokemongo game. ELEC 2645 final project.
Diff: pokeball/PokeEngine.h
- Revision:
- 0:819c2d6a69ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pokeball/PokeEngine.h Thu Apr 15 15:35:12 2021 +0000 @@ -0,0 +1,32 @@ +#ifndef POKEENGINE_H +#define POKEENGINE_H + +#include "mbed.h" +#include "N5110.h" +#include "Pokeball.h" +#include "Pokemon.h" +#include "Rocket.h" +#include "Utils.h" + +class PokeEngine{ + public: + PokeEngine(); // pass in the lcd object from the main file + void init(int ball_x, int ball_y, int ball_radius, int pokemong_x, int pokemon_y, int pokemon_size, int speed); + void init_rocket(int x, int y,int size, int speed); + int update(UserInput input); + void draw(N5110 &lcd); + void check_lives(int lives); + int get_lives(); + int get_score(); + + private: + Pokeball _pokeball; + Pokemon _pokemon; + Rocket _rocket; + void check_catching_collision(); + void check_wall_collision(); + void check_crash(); + int _lives,_score; +}; + +#endif \ No newline at end of file