34 Power(
int screen_width,
int screen_height);
69 virtual void reset(
int screen_width);
Base class for all ball types in the game.
SDL_Renderer * renderer
Definition ball_test.cpp:25
Abstract base class for all ball types in the game.
Definition ball_base.hpp:23
Represents a player paddle/racket in the game.
Definition paddle.hpp:20
Class representing power-up items that affect gameplay.
Definition power.hpp:27
int height
Definition power.hpp:88
bool effect_is_active
Definition power.hpp:91
int width
Definition power.hpp:88
virtual void update(float time, Paddle *racket1, Paddle *racket2, SDL_Renderer *renderer, BallBase *ball)
Updates the power's position and effect.
Definition power.cpp:42
Power(int screen_width, int screen_height)
Constructor for the Power class.
Definition power.cpp:21
float duration_effect
Definition power.hpp:90
void set_effect_is_active(bool active)
Definition power.hpp:81
virtual void reset(int screen_width)
Resets the power-up to a new random position.
Definition power.cpp:174
float y
Definition power.hpp:86
virtual void render(SDL_Renderer *renderer)
Renders the power on screen.
Definition power.cpp:110
bool play
Definition power.hpp:87
SDL_Texture * power_texture
Definition power.hpp:94
void set_is_active(bool active)
Sets the active state of the power-up.
Definition power.hpp:75
float speed
Definition power.hpp:89
float x
Definition power.hpp:85
SDL_Color color
Definition power.hpp:92
bool collision(BallBase *ball_type) const
Checks for collision between the power and the ball.
Definition power.cpp:153
bool is_active
Definition power.hpp:93
Defines macros and constants used throughout the project.
Header defining the Paddle class for the game.