TimeScoreRecord.prototype = Object.create(Phaser.State.prototype);
TimeScoreRecord.constructor = TimeScoreRecord;

function TimeScoreRecord(x, y) {
	this.timeText = new TimerText(x + TimeScoreRecord.TIMER_OFFSET_X, y, 30);
	this.scoreText = this.makeScoreText(x + TimeScoreRecord.SCORE_OFFSET_X, y);

	return this;
}


TimeScoreRecord.prototype.makeScoreText = function(x, y) {
	var scoreText = game.add.text(x, y, "");
	scoreText.anchor.set(1, 0.5);
	// scoreText.font = "Orbitron";
	scoreText.fontSize = 30;
	scoreText.fontWeight = "bold";	// "normal";
	scoreText.style.fill = "white";
	scoreText.stroke = "#000000";
	scoreText.strokeThickness = 6;
	scoreText.text = "0";

	return scoreText;
}

TimeScoreRecord.prototype.setContent = function(time, score) {
	this.timeText.setMSTimeText(time);
	this.scoreText.text = NumberUtil.numberWithCommas(Math.floor(score));
}

TimeScoreRecord.prototype.setTextColorString = function(colorString) {
	this.timeText.setTextColorString(colorString);
	this.scoreText.style.fill = colorString;
}

TimeScoreRecord.TIMER_OFFSET_X	= 0;
TimeScoreRecord.SCORE_OFFSET_X	= 120;