#include "Mur.h" #include "Deplacable.h" #include //constructeur Mur::Mur(const int x ,const int y,const int nbrFrameLargeur,const int nbrFrameHauteur, const int l, const int c): Bloc( x, y, Animation::MUR, 1, 1){ sf::IntRect rect(sf::IntRect(c*T_CASE, l*T_CASE, (c+1)*T_CASE, (l+1)*T_CASE)); m_anim.SetSprite(rect); //m_anim.SetCouleurFond(sf::Color(255, 0, 255)); } bool Mur::IsCassable(){ return true; } bool Mur::IsDetruit(){ return m_detruit; } void Mur::Effet(Deplacable& dep, int cote){ Bloc::Effet(dep, cote); if(cote == Deplacable::BAS && dep.Type() == Deplacable::HEROS) m_detruit = true; } void Mur::Animer(){ m_anim.Animer(0, 0, Animation::STATIC); }