casse-brick latest
Ce projet est réalisé dans le cadre du cours de Programmation Avancée en M1 Informatique de l'université de Strasbourg.
Loading...
Searching...
No Matches
triangle.cpp
Go to the documentation of this file.
1//
2// Created by maxime on 10/05/24.
3//
4
5#include "triangle.h"
6
7
8Triangle::Triangle(int x, int y, int h, int w, bool isTop)
9:
10 Brique(x, y, h, w, isTop)
11{}
12
13void Triangle::render(std::shared_ptr<SDL_Renderer> renderer, SDL_Color color1,SDL_Color color2) {
14 collider->render(renderer, this->color1,this->color2);
15}
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.
void render(std::shared_ptr< SDL_Renderer > renderer, SDL_Color color1, SDL_Color color2) override
Renders the triangular block on the screen.
Definition triangle.cpp:13
Triangle(int x, int y, int h, int w, bool isTop)
Constructs a new Triangle object with specified parameters.
Definition triangle.cpp:8