SpaceObject::SpaceObject(sf::Texture &t, Resources &res, int health, int speed) : explosionTexture(res.getImg()->getExplosion_t()) { //Create graphical object this->sprite.setTexture(t); //Set properties values this->health = health; this->speed = speed; //Set the explosion sound buffer this->explosionSound.setBuffer(res.getExplosionSnd()); this->explosionSound.setVolume(res.getConfigXML()->getSettings()->getVolumeSound()); }