added collisions
This commit is contained in:
@@ -1,19 +1,9 @@
|
||||
#include "elements.hpp"
|
||||
#include <SFML/Graphics/Rect.hpp>
|
||||
#include <iostream>
|
||||
|
||||
#include <SFML/Graphics/Color.hpp>
|
||||
#include <SFML/System/Vector2.hpp>
|
||||
#include <SFML/Window/Keyboard.hpp>
|
||||
|
||||
/* Entitiy
|
||||
* Parent class
|
||||
* Holds all 4 corners of rect
|
||||
* Bounding checks for if a rect1_top_left is between rect2_top_right - rect2_top_left
|
||||
*
|
||||
*
|
||||
* */
|
||||
|
||||
Entity::Entity(sf::Vector2<float> size, sf::Vector2<float> pos, sf::Vector2f velocity, float border_thickness, sf::Color inside_color, sf::Color border_color) {
|
||||
rect.setSize(size);
|
||||
rect.setPosition(pos);
|
||||
|
||||
Reference in New Issue
Block a user