Ejemplo n.º 1
0
// 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);
		}
	}
}
Ejemplo n.º 2
0
//--------------------------------------------------------------
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);
	}
}