"use strict";
var TitleScreen = function(subtitle, callback) {
	this.sprites = {
		logo : 'main_logo',
		spaceShip : 'main_space_ship'
	};

	this.step = function(dt) {
		if (game.keys['enter'] || game.keys['fire']) {
			if (callback)
				callback();
		}
	};

	this.draw = function(ctx) {
		 ctx.fillStyle = "#FFDD4A";
		 ctx.textAlign = "center";
		 
		ctx.font = "bold 30px bangers";
		ctx.fillText(subtitle, view.getWidth() / 2, view.getHeight() / 2 + 20);

		spriteSheet.draw(ctx, this.sprites.logo, 107, 152);
		spriteSheet.draw(ctx, this.sprites.spaceShip, 0, 681);

	};
};