bool GestionnaireCollision::collisionMur(const Pacman& pacman, const Case& mur) { // 0 et 4 représente les tile ou l'on peut passer if(mur.getType() != 0 && mur.getType() != 4 && mur.getType() != 5) { return pacman.getSprite().getGlobalBounds().intersects(mur.getRectangle().getGlobalBounds()); } else { return false; } }
bool GestionnaireCollision::collisionFantome(const Fantome& fantome, const Pacman& pacman) { return pacman.getSprite().getGlobalBounds().intersects(fantome.getSprite().getGlobalBounds()); }