Alexandra Posta / Mbed OS ELEC2645_Race_Collision

Dependencies:   ELEC2645_JoystickLCD_LPC1768_2021

Committer:
alex_20
Date:
Sat Apr 24 21:31:19 2021 +0000
Revision:
8:1fc5e14b0db6
Parent:
1:2ae7a8b01771
Child:
9:6f060f495536
Before game engine. ball done

Who changed what in which revision?

UserRevisionLine numberNew contents of line
alex_20 8:1fc5e14b0db6 1 #include "Ball.h"
alex_20 8:1fc5e14b0db6 2
alex_20 8:1fc5e14b0db6 3 // constructure
alex_20 8:1fc5e14b0db6 4 Ball::Ball() {}
alex_20 8:1fc5e14b0db6 5
alex_20 8:1fc5e14b0db6 6 void Ball::init() {
alex_20 8:1fc5e14b0db6 7 //initialize parameters
alex_20 8:1fc5e14b0db6 8 //say that trajectory is 0
alex_20 8:1fc5e14b0db6 9 }
alex_20 8:1fc5e14b0db6 10
alex_20 8:1fc5e14b0db6 11 //std::vector<Vector2Df> Ball::get_path() {
alex_20 8:1fc5e14b0db6 12 // path points = utils.getCurve;
alex_20 8:1fc5e14b0db6 13 // return path_points;
alex_20 8:1fc5e14b0db6 14 // }
alex_20 8:1fc5e14b0db6 15
alex_20 8:1fc5e14b0db6 16 void Ball::draw(N5110 &lcd, std::vector<Vector2Df> path_points, int radius, float iterator) {
alex_20 8:1fc5e14b0db6 17 lcd.drawCircle(static_cast<int>(path_points[iterator].x), static_cast<int>(path_points[iterator].y), radius, FILL_TRANSPARENT);
alex_20 8:1fc5e14b0db6 18 }