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
WALL.h
Go to the documentation of this file.
1//
2// Created by nicolas elfering on 14.04.24.
3//
4
5#ifndef CASSE_BRIQUE_WALL_H
6#define CASSE_BRIQUE_WALL_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#include <utility>
14
15#include "CollidingObject.h"
16
17
18class WALL : public CollidingObject{
19private:
20 SDL_Color color;
21 SDL_Rect rect{};
22public:
23 bool kills;
24 WALL(int x, int y, int width, int height,const std::string& id,bool kill);
25 void render(std::shared_ptr<SDL_Renderer> renderer, SDL_Color color1,SDL_Color color2) override;
26 void handleCollisions(point collision) override{};
27};
28
29
30#endif //CASSE_BRIQUE_WALL_H
The CollidingObject class represents a generic colliding object.
Definition WALL.h:18
void render(std::shared_ptr< SDL_Renderer > renderer, SDL_Color color1, SDL_Color color2) override
Renders the object on the screen.
Definition WALL.cpp:16
SDL_Rect rect
Definition WALL.h:21
bool kills
Definition WALL.h:23
SDL_Color color
Definition WALL.h:20
void handleCollisions(point collision) override
Handles collisions with other objects.
Definition WALL.h:26
The point struct represents a point in 2D space.