Files
CPPGameBook/Capter1/ball.hpp

25 lines
345 B
C++

#include "SDL2/SDL.h"
#include <iostream>
class ball
{
private:
int r_dir;
int g_dir;
int b_dir;
public:
SDL_Rect rect;
SDL_Color color;
float velx;
float vely;
public:
ball();
~ball();
int GetXPos();
int GetYPos();
void Update(float f_DeltaTime);
void Draw(SDL_Renderer* renderer);
};