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
rectangle.h
Go to the documentation of this file.
1//
2// Created by maxime on 08/05/24.
3//
4
5#ifndef CASSE_BRIQUE_RECTANGLE_H
6#define CASSE_BRIQUE_RECTANGLE_H
7
8#include <SDL2/SDL.h>
9#include <SDL_image.h>
10#include <SDL2/SDL_timer.h>
11#include <iostream>
12#include <memory>
13
14#include "brique.h"
15
16
22class Rectangle : public Brique {
23public:
32 Rectangle(int x, int y, int w, int h);
33
41 void render(std::shared_ptr<SDL_Renderer> renderer, SDL_Color color1, SDL_Color color2) override;
42};
43
44
45
46#endif //CASSE_BRIQUE_RECTANGLE_H
The Brique class represents a block object in the game.
Definition brique.h:36
SDL_Color color1
The primary color of the block.
Definition brique.h:38
SDL_Color color2
The secondary color of the block.
Definition brique.h:39
The Rectangle class represents a rectangular block.
Definition rectangle.h:22
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