// PROTECTED //-------------------------------------------------------------- void Sprite::resizeIfNecessary() { if(width != 0 && height != 0) { for(unsigned int i = 0; i < frames.size(); ++i) { DrawableFrame* f = frames.at(i); f->setSize(width, height); } } }
//-------------------------------------------------------------- void Sprite::setSize(unsigned int w, unsigned int h) { width = w; height = h; for(unsigned int i = 0; i < frames.size(); ++i) { DrawableFrame* f = frames.at(i); f->setSize(w, h); } }