71 SDL_Surface* spriteSheet;
79 SDL_Renderer* renderer;
const int PADDLE_HEIGHT
Definition: Paddle.h:9
const int PADDLE_WIDTH
Definition: Paddle.h:8
const float PADDLE_SPEED
Definition: Paddle.h:10
const int WINDOW_WIDTH
The Width of the game window.
Definition: Pong.cpp:20
Represents Ball in the game.
Definition: Ball.h:16
Represents Paddle in the game.
Definition: Paddle.h:15
Paddle(Vec2 position, Vec2 velocity, SDL_Renderer *renderer)
The constructor of the Paddle class that takes in initial position and velocity along with renderer a...
Definition: Paddle.cpp:3
void Update(float dt, int WINDOW_WIDTH)
This method will update the position of the paddle.
Definition: Paddle.cpp:33
Vec2 velocity
The velocity of the paddle.
Definition: Paddle.h:48
Contact checkCollision(Ball const &ball)
This Method checks the collision of Paddle with ball and returns where the ball hit the paddle.
Definition: Paddle.cpp:49
void Draw()
This Method helps the paddle to be rendered on the screen.
Definition: Paddle.cpp:26
void Reset()
This method will reset the padddle to it's inital position and velocity.
Definition: Paddle.cpp:127
The resource manager is responsible for handling and managing resources regarding the game.
Definition: ResourceManager.h:12
static ResourceManager & getInstance()
Method used to get instance of ResourceManager class.
Definition: ResourceManager.cpp:10
Vec2 will abstract X&Y position for ball and paddle.
Definition: Vec2.h:6
GLuint texture
Definition: glad.h:2396