The NEW Pong Game V13.2.1
An interesting implemnettaion of the pong game
Loading...
Searching...
No Matches
inverse_power.hpp
Go to the documentation of this file.
1
8#ifndef INVERSE_POWER_HPP
9#define INVERSE_POWER_HPP
10
11#include "power.hpp"
12#include "macros.hpp"
13
22class InversiblePower : public Power {
23 public:
29 InversiblePower(int screen_width, int screen_height);
30
39 void update(float time, Paddle* racket1, Paddle* racket2, SDL_Renderer* renderer, BallBase *ball) override;
40
45 void render(SDL_Renderer* renderer) override;
46
51 void reset(int screen_width) override;
52
53 private:
54 bool inverse_paddle = false;
55 float repeat;
56 };
57
58#endif
SDL_Renderer * renderer
Definition ball_test.cpp:25
Abstract base class for all ball types in the game.
Definition ball_base.hpp:23
Power-up that inverts paddle controls temporarily.
Definition inverse_power.hpp:22
bool inverse_paddle
Definition inverse_power.hpp:54
void update(float time, Paddle *racket1, Paddle *racket2, SDL_Renderer *renderer, BallBase *ball) override
Updates the power-up state.
Definition inverse_power.cpp:41
float repeat
Definition inverse_power.hpp:55
void reset(int screen_width) override
Resets the power-up position.
Definition inverse_power.cpp:162
InversiblePower(int screen_width, int screen_height)
Constructor for InversiblePower.
Definition inverse_power.cpp:19
void render(SDL_Renderer *renderer) override
Renders the power-up on screen.
Definition inverse_power.cpp:104
Represents a player paddle/racket in the game.
Definition paddle.hpp:20
Class representing power-up items that affect gameplay.
Definition power.hpp:27
Defines macros and constants used throughout the project.
Header defining the Power class for special game effects.