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

Committer:
Nathanj94
Date:
Tue Mar 14 10:50:52 2017 +0000
Revision:
0:8d02400f792a
Child:
1:43fbcc3584d6
Catch_Model.h incomplete
; Catch_Model.cpp incomplete
; Library has no documentation and has only been developed to allow the movement of the basket on the display

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Nathanj94 0:8d02400f792a 1 #include "Catch_Model.h"
Nathanj94 0:8d02400f792a 2
Nathanj94 0:8d02400f792a 3 Catch_Model::Catch_Model()
Nathanj94 0:8d02400f792a 4 {
Nathanj94 0:8d02400f792a 5
Nathanj94 0:8d02400f792a 6 }
Nathanj94 0:8d02400f792a 7
Nathanj94 0:8d02400f792a 8 Catch_Model::~Catch_Model()
Nathanj94 0:8d02400f792a 9 {
Nathanj94 0:8d02400f792a 10
Nathanj94 0:8d02400f792a 11 }
Nathanj94 0:8d02400f792a 12
Nathanj94 0:8d02400f792a 13 void Catch_Model::init(int basket_y, int basket_width)
Nathanj94 0:8d02400f792a 14 {
Nathanj94 0:8d02400f792a 15 _basket_y = basket_y;
Nathanj94 0:8d02400f792a 16 _basket_width = basket_width;
Nathanj94 0:8d02400f792a 17
Nathanj94 0:8d02400f792a 18 _basket.Basket_init(_basket_y, _basket_width);
Nathanj94 0:8d02400f792a 19 }
Nathanj94 0:8d02400f792a 20
Nathanj94 0:8d02400f792a 21 void Catch_Model::input(Gamepad &pad)
Nathanj94 0:8d02400f792a 22 {
Nathanj94 0:8d02400f792a 23 _d = pad.get_direction();
Nathanj94 0:8d02400f792a 24 _mag = pad.get_mag();
Nathanj94 0:8d02400f792a 25 }
Nathanj94 0:8d02400f792a 26
Nathanj94 0:8d02400f792a 27 void Catch_Model::update(Gamepad &pad)
Nathanj94 0:8d02400f792a 28 {
Nathanj94 0:8d02400f792a 29 _basket.Basket_move(_d, _mag, _pad);
Nathanj94 0:8d02400f792a 30 }
Nathanj94 0:8d02400f792a 31
Nathanj94 0:8d02400f792a 32 void Catch_Model::draw(N5110 &lcd)
Nathanj94 0:8d02400f792a 33 {
Nathanj94 0:8d02400f792a 34 _basket.Basket_draw(lcd);
Nathanj94 0:8d02400f792a 35 }