You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
560 B
C++

#ifndef BALL_H
#define BALL_H
class Ball {
public:
raylib::Vector2 pos;
raylib::Vector2 initial_pos;
raylib::Vector2 vel;
raylib::Vector2 initial_vel;
int radius;
raylib::Color color;
/* Constructor */
Ball(int pos_x, int pos_y, int radius, int vel_x, int vel_y);
/* Set the position of the ball */
void setPosition(Vector2 pos);
/* Reset the position and velocity of the ball */
void reset();
/* Update the position of the ball based on its velocity */
void updatePosition();
/* Draw the ball onto the screen */
void draw();
};
#endif