casse-brick
Loading...
Searching...
No Matches
rectangle.cpp
Go to the documentation of this file.
1//
2// Created by maxime on 08/05/24.
3//
4
5#include "rectangle.h"
6
7
8Rectangle::Rectangle(int x, int y, int w, int h)
9:
10 Brique(x,y,w,h)
11{}
12
13
14void Rectangle::render(std::shared_ptr<SDL_Renderer> renderer, SDL_Color color1,SDL_Color color2){
15 collider->render(renderer,this->color1,this->color2);
16}
The Brique class represents a block object in the game.
Definition brique.h:36
std::shared_ptr< Collider > collider
The collider associated with the object.
Rectangle(int x, int y, int w, int h)
Constructs a new Rectangle object with specified parameters.
Definition rectangle.cpp:8
void render(std::shared_ptr< SDL_Renderer > renderer, SDL_Color color1, SDL_Color color2) override
Renders the rectangular block on the screen.
Definition rectangle.cpp:14