Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
My_game_clases/Objects.h
- Committer:
- thestudent
- Date:
- 2020-04-01
- Revision:
- 6:33bdb54c2c88
- Child:
- 9:4b11ee1155ad
File content as of revision 6:33bdb54c2c88:
#ifndef OBJECTS_H #define OBJECTS_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include <vector> class Objects{ public: Objects();//initialises variables void draw_base(N5110 &lcd);// draws the base void cannon_position(Gamepad &pad);// changes the cannon position depending of the joystick void draw_cannon(N5110 &lcd);//draws the cannon void draw_shots(N5110 &lcd);// makes the shoting on the screen //ball_x: balls x position; ball_y: balls y position; delta_r: added to the inital radiuss to make the ball bigger void draw_ball(N5110 &lcd, int ball_x, int ball_y, int delta_r);//draws the ball vector <int> _shot_y_pos; //holds the shots y positions vector <int> _shot_x_pos;//holds the shots x positons private: int _cannon_pos; //stores the positon of the cannon int _initial_shot_pos;//stroes the initial vertical position of the shot int _shot_incrementer;//increments the shot on the lcd by 2 int _radiuss;// the initiak radiuss of the ball }; #endif