5#ifndef CASSE_BRIQUE_PLATFORM_H
6#define CASSE_BRIQUE_PLATFORM_H
10#include <SDL2/SDL_timer.h>
46 void input(SDL_KeyboardEvent event,
bool up);
55 void render(std::shared_ptr<SDL_Renderer>
renderer, SDL_Color color1, SDL_Color color2)
override;
The MovingObject class represents a moving colliding object.
The PLATFORM class represents a movable platform object.
void render(std::shared_ptr< SDL_Renderer > renderer, SDL_Color color1, SDL_Color color2) override
Renders the platform on the screen.
void move() override
Moves the platform horizontally.
void handleCollisions(point collision) override
Handles collisions with other objects.
int min_width
The minimum width of the platform's movement range.
void input(SDL_KeyboardEvent event, bool up)
Handles input events for moving the platform.
int speed
The speed at which the platform moves.
int max_width
The maximum width of the platform's movement range.
std::shared_ptr< SDL_Renderer > renderer
A shared pointer to the SDL renderer.
The point struct represents a point in 2D space.