25 lines
329 B
C++
25 lines
329 B
C++
#include "SDL2/SDL.h"
|
|
|
|
class ball
|
|
{
|
|
private:
|
|
int r_dir;
|
|
int g_dir;
|
|
int b_dir;
|
|
public:
|
|
SDL_Rect rect;
|
|
float x;
|
|
float y;
|
|
float velx;
|
|
float vely;
|
|
SDL_Color color;
|
|
|
|
public:
|
|
ball();
|
|
~ball();
|
|
int GetXPos();
|
|
int GetYPos();
|
|
void Update();
|
|
void Draw(SDL_Renderer* renderer);
|
|
};
|