Nemesis game, engine
Engine.h
- Committer:
- musallambseiso
- Date:
- 2017-05-01
- Revision:
- 11:10c01766f774
- Parent:
- 10:b2dd5f484f98
- Child:
- 12:d68c757d829a
File content as of revision 11:10c01766f774:
#ifndef ENGINE_H #define ENGINE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Ship1.h" #include "Ship2.h" #include "Ship3.h" #include "Ship4.h" #include "Ship5.h" #include "Ship6.h" #include "Friendly.h" #include "Bullet.h" #include "Stats.h" // gap from edge of screen #define GAP 2 class Engine { public: Engine(); ~Engine(); int collisions; int wave_counter; int ammo; bool trigger; int _x; int _y; void init(int speed, N5110 &lcd, Gamepad &pad); void read_input(Gamepad &pad); void checker(N5110 &lcd, Gamepad &pad); void update(N5110 &lcd, Gamepad &pad); void draw(N5110 &lcd); void shoot(N5110 &lcd, Gamepad &pad); private: void ships_draw(N5110 &lcd); void check_wall_collision(Gamepad &pad); void check_friendly_collisions(Gamepad &pad); void check_pass(Gamepad &pad); void check_enemy_death(Gamepad &pad); void check_death(Gamepad &pad, Vector2D ship_pos); void check_death_all(N5110 &lcd, Gamepad &pad); void game_over(N5110 &lcd, Gamepad &pad); void level_two(N5110 &lcd, Gamepad &pad); void level_three(N5110 &lcd, Gamepad &pad); void level_four(N5110 &lcd, Gamepad &pad); void level_five(N5110 &lcd, Gamepad &pad); void wave_draw(N5110 &lcd); Friendly _friendly; int _speed; Ship1 _ship1; Ship2 _ship2; Ship3 _ship3; Ship4 _ship4; Ship5 _ship5; Ship6 _ship6; Bullet _bullet; Stats _stats; Direction _d; float _mag; }; #endif