Yudong Xiao / Mbed OS pokemon

Dependencies:   Tone

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PokeEngine.h Source File

PokeEngine.h

00001 #ifndef POKEENGINE_H
00002 #define POKEENGINE_H
00003 
00004 #include "mbed.h"
00005 #include "N5110.h"
00006 #include "Pokeball.h"
00007 #include "Pokemon.h"
00008 #include "Rocket.h"
00009 #include "Utils.h"
00010 
00011 class PokeEngine{
00012     public:
00013         PokeEngine();  // pass in the lcd object from the main file
00014         void init(int ball_x, int ball_y, int ball_radius, int pokemong_x, int pokemon_y, int pokemon_size, int speed);
00015         void init_rocket(int x, int y,int size, int speed);
00016         int update(UserInput input);
00017         void draw(N5110 &lcd);    
00018        void check_lives(int lives);
00019         int get_lives();
00020         int get_score();
00021 
00022     private:
00023         Pokeball _pokeball;
00024         Pokemon _pokemon;
00025         Rocket _rocket;
00026         void check_catching_collision();  
00027         void check_wall_collision();
00028         void check_crash();
00029         int _lives,_score;
00030 };
00031         
00032 #endif