30 lines
468 B
C++
30 lines
468 B
C++
#include "SDL3/SDL.h"
|
|
#include <iostream>
|
|
#include <vector>
|
|
|
|
class ball
|
|
{
|
|
private:
|
|
int r_dir;
|
|
int g_dir;
|
|
int b_dir;
|
|
public:
|
|
SDL_FRect rect;
|
|
SDL_Color color;
|
|
float velx;
|
|
float vely;
|
|
bool alive;
|
|
|
|
public:
|
|
ball();
|
|
~ball();
|
|
|
|
//ball(int x, int y);
|
|
ball(int x, int y, int vx, int vy);
|
|
|
|
int GetXPos();
|
|
int GetYPos();
|
|
void Update(float f_DeltaTime, std::vector<ball> &list);
|
|
void Draw(SDL_Renderer* renderer);
|
|
};
|