"use strict";
var Explosion = function(centerX, centerY, explosionName) {
	this.type = game.getObjectTypes().EXPLOSION;
	if (explosionName) {
		this.setup(explosionName, {
			frame : 0
		});
	} else {
		this.setup('explosion', {
			frame : 0
		});
	}
	this.x = centerX - this.w / 2;
	this.y = centerY - this.h / 2;
	this.subFrame = 0;
	this.step = function(dt) {
		this.frame = Math.floor(this.subFrame++/3);
		if (this.subFrame >= 36) {
			this.board.remove(this);
		}
	};
};

game.inherit(Explosion, Sprite);
