"use strict";
var Sprite = function() {
};

Sprite.prototype.setup = function(sprite, props) {
	this.sprite = sprite;
	this.merge(props);
	this.frame = this.frame || 0;
	this.w = spriteSheet.getSprites()[sprite].w;
	this.h = spriteSheet.getSprites()[sprite].h;
};

Sprite.prototype.merge = function(props) {
	if (props) {
		for ( var prop in props) {
			this[prop] = props[prop];
		}
	}
};

Sprite.prototype.draw = function(ctx) {
	spriteSheet.draw(ctx, this.sprite, this.x, this.y, this.frame);
};

Sprite.prototype.drawOver = function(ctx) {
};

Sprite.prototype.drawUnder = function(ctx) {
};

Sprite.prototype.hit = function(damage, explosionName) {
	this.board.remove(this);
};