Uses accompanying Basket, Objects and Fruit libraries to create Fruit Basket game. If an object is caught, points are added; if an object in missed, a 'life' is lost.
Dependents: Game_Controller_Project
Catch_Model.h
- Committer:
- Nathanj94
- Date:
- 2017-03-18
- Revision:
- 2:8410e09b77aa
- Parent:
- 1:43fbcc3584d6
- Child:
- 3:fc9133faec7a
File content as of revision 2:8410e09b77aa:
#ifndef CATCH_MODEL_H #define CATCH_MODEL_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Basket.h" #include "Objects.h" class Catch_Model { public: Catch_Model(); ~Catch_Model(); void init(int basket_y, int basket_width, int objects_speed); void input(Gamepad &pad); void update(Gamepad &pad); void draw(N5110 &lcd); void check_basket_catch(N5110 &lcd); void check_basket_miss(); private: Basket _basket; Objects _objects; int _basket_y; int _basket_width; int _objects_speed; int basket_pos; int objects_pos; Direction _d; float _mag; }; #endif