Skip to content
Snippets Groups Projects
Tangible.cpp 566 B
Newer Older
  • Learn to ignore specific revisions
  • BATON Theau's avatar
    BATON Theau committed
    #include "Tangible.hpp"
    
    namespace megu {
        Tangible::Tangible(const Position & position, const Dimension & dimension) 
        : _box(position, dimension) {}
    
        bool Tangible::isColliding(const Tangible & entity) const {
            if(this != &entity) {
                return this->_box.intersect(entity._box);
            }
            return false;
        }
    
        bool Tangible::operator==(const Tangible & entity) const {
            return this->_box == entity._box;
        }
    
    
    BATON Theau's avatar
    BATON Theau committed
        /*bool Tangible::operator!=(const Tangible & entity) const {
    
    BATON Theau's avatar
    BATON Theau committed
            return !(*this == entity);
    
    BATON Theau's avatar
    BATON Theau committed
        }*/