Fix: remove useless stage_timer.js file
This commit is contained in:
@@ -1,69 +0,0 @@
|
|||||||
function StageTimer(stageTimerSec, onTimeOver) {
|
|
||||||
this.stageTimerSec = stageTimerSec;
|
|
||||||
this.onTimeOver = onTimeOver;
|
|
||||||
|
|
||||||
var fontStyle = StageTimer.DEFAULT_TEXT_FONT;
|
|
||||||
|
|
||||||
fontStyle.align = "right";
|
|
||||||
fontStyle.boundsAlignH = "right";
|
|
||||||
this.timerText = game.add.text(game.world.width - 300, 0, "", fontStyle)
|
|
||||||
.setTextBounds(0, 0, 200, StageTimer.FONT_HEIGHT_PX);
|
|
||||||
|
|
||||||
// var grd = this.label.context.createLinearGradient(0, 0, 0, StageTimer.FONT_HEIGHT_PX);
|
|
||||||
// grd.addColorStop(0, '#8ED6FF');
|
|
||||||
// grd.addColorStop(1, '#004CB3');
|
|
||||||
// this.label.fill = grd;
|
|
||||||
// this.scoreText.fill = grd;
|
|
||||||
|
|
||||||
// this.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
|
||||||
// this.label.stroke = '#000';
|
|
||||||
// this.label.strokeThickness = 3;
|
|
||||||
|
|
||||||
this.timerEvent = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
StageTimer.prototype.start = function() {
|
|
||||||
this.timeLeft = this.stageTimerSec;
|
|
||||||
this.printTime();
|
|
||||||
if(this.timerEvent === null)
|
|
||||||
this.timerEvent = game.time.events.loop(Phaser.Timer.SECOND, this.updateTimer, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
StageTimer.prototype.pause = function() {
|
|
||||||
}
|
|
||||||
|
|
||||||
StageTimer.prototype.stop = function() {
|
|
||||||
if(this.timerEvent)
|
|
||||||
this.removeTimer();
|
|
||||||
this.timerText.text = "시간 끝";
|
|
||||||
}
|
|
||||||
|
|
||||||
StageTimer.prototype.updateTimer = function() {
|
|
||||||
this.timeLeft--;
|
|
||||||
if(this.timeLeft === 0) {
|
|
||||||
this.stop();
|
|
||||||
this.onTimeOver();
|
|
||||||
} else {
|
|
||||||
this.printTime();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StageTimer.prototype.printTime = function() {
|
|
||||||
this.timerText.text = this.timeLeft.toString() + "초";
|
|
||||||
}
|
|
||||||
|
|
||||||
StageTimer.prototype.removeTimer = function() {
|
|
||||||
game.time.events.remove(this.timerEvent);
|
|
||||||
this.timerEvent = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
StageTimer.FONT_HEIGHT_PX = 70;
|
|
||||||
|
|
||||||
StageTimer.DEFAULT_TEXT_FONT = {
|
|
||||||
font: "38px Arial",
|
|
||||||
align: "center",
|
|
||||||
boundsAlignH: "center", // left, center. right
|
|
||||||
boundsAlignV: "middle", // top, middle, bottom
|
|
||||||
fill: "#fff"
|
|
||||||
};
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
function StageTimer(stageTimerSec, onTimeOver) {
|
|
||||||
this.stageTimerSec = stageTimerSec;
|
|
||||||
this.onTimeOver = onTimeOver;
|
|
||||||
|
|
||||||
var fontStyle = StageTimer.DEFAULT_TEXT_FONT;
|
|
||||||
|
|
||||||
fontStyle.align = "right";
|
|
||||||
fontStyle.boundsAlignH = "right";
|
|
||||||
this.timerText = game.add.text(game.world.width - 300, 0, "", fontStyle)
|
|
||||||
.setTextBounds(0, 0, 200, StageTimer.FONT_HEIGHT_PX);
|
|
||||||
|
|
||||||
// var grd = this.label.context.createLinearGradient(0, 0, 0, StageTimer.FONT_HEIGHT_PX);
|
|
||||||
// grd.addColorStop(0, '#8ED6FF');
|
|
||||||
// grd.addColorStop(1, '#004CB3');
|
|
||||||
// this.label.fill = grd;
|
|
||||||
// this.scoreText.fill = grd;
|
|
||||||
|
|
||||||
// this.setShadow(3, 3, 'rgba(0, 0, 0, 0.5)', 2);
|
|
||||||
// this.label.stroke = '#000';
|
|
||||||
// this.label.strokeThickness = 3;
|
|
||||||
|
|
||||||
this.timerEvent = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
StageTimer.prototype.start = function() {
|
|
||||||
this.timeLeft = this.stageTimerSec;
|
|
||||||
this.printTime();
|
|
||||||
if(this.timerEvent === null)
|
|
||||||
this.timerEvent = game.time.events.loop(Phaser.Timer.SECOND, this.updateTimer, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
StageTimer.prototype.pause = function() {
|
|
||||||
}
|
|
||||||
|
|
||||||
StageTimer.prototype.stop = function() {
|
|
||||||
if(this.timerEvent)
|
|
||||||
this.removeTimer();
|
|
||||||
this.timerText.text = "시간 끝";
|
|
||||||
}
|
|
||||||
|
|
||||||
StageTimer.prototype.updateTimer = function() {
|
|
||||||
this.timeLeft--;
|
|
||||||
if(this.timeLeft === 0) {
|
|
||||||
this.stop();
|
|
||||||
this.onTimeOver();
|
|
||||||
} else {
|
|
||||||
this.printTime();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StageTimer.prototype.printTime = function() {
|
|
||||||
this.timerText.text = this.timeLeft.toString() + "초";
|
|
||||||
}
|
|
||||||
|
|
||||||
StageTimer.prototype.removeTimer = function() {
|
|
||||||
game.time.events.remove(this.timerEvent);
|
|
||||||
this.timerEvent = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
StageTimer.FONT_HEIGHT_PX = 70;
|
|
||||||
|
|
||||||
StageTimer.DEFAULT_TEXT_FONT = {
|
|
||||||
font: "38px Arial",
|
|
||||||
align: "center",
|
|
||||||
boundsAlignH: "center", // left, center. right
|
|
||||||
boundsAlignV: "middle", // top, middle, bottom
|
|
||||||
fill: "#fff"
|
|
||||||
};
|
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
<script src="../../game/lib/game_over_text.js"></script>
|
<script src="../../game/lib/game_over_text.js"></script>
|
||||||
<script src="../../game/lib/animal.js"></script>
|
<script src="../../game/lib/animal.js"></script>
|
||||||
<script src="../../game/lib/animal_list.js"></script>
|
<script src="../../game/lib/animal_list.js"></script>
|
||||||
|
<script src="../../game/lib/stage_timer.js"></script>
|
||||||
|
|
||||||
<!-- Test typing : source files -->
|
<!-- Test typing : source files -->
|
||||||
<script src="../../game/typing/alphabet_list/korean_basic.js"></script>
|
<script src="../../game/typing/alphabet_list/korean_basic.js"></script>
|
||||||
@@ -63,7 +64,6 @@
|
|||||||
<script src="../../game/typing/lib/keyboard.js"></script>
|
<script src="../../game/typing/lib/keyboard.js"></script>
|
||||||
|
|
||||||
<script src="../../game/typing/practice/define_variables.js"></script>
|
<script src="../../game/typing/practice/define_variables.js"></script>
|
||||||
<script src="../../game/typing/practice/stage_timer.js"></script>
|
|
||||||
<script src="../../game/typing/practice/typing_score.js"></script>
|
<script src="../../game/typing/practice/typing_score.js"></script>
|
||||||
<script src="../../game/typing/practice/loading.js"></script>
|
<script src="../../game/typing/practice/loading.js"></script>
|
||||||
<script src="../../game/typing/practice/game.js"></script>
|
<script src="../../game/typing/practice/game.js"></script>
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
<script src="../../game/lib/experience_app_timer.js"></script>
|
<script src="../../game/lib/experience_app_timer.js"></script>
|
||||||
<script src="../../game/lib/game_over_text.js"></script>
|
<script src="../../game/lib/game_over_text.js"></script>
|
||||||
<script src="../../game/lib/animal.js"></script>
|
<script src="../../game/lib/animal.js"></script>
|
||||||
|
<script src="../../game/lib/stage_timer.js"></script>
|
||||||
|
|
||||||
<!-- Test typing : source files -->
|
<!-- Test typing : source files -->
|
||||||
<script src="../../game/typing/alphabet_list/korean_basic_left.js"></script>
|
<script src="../../game/typing/alphabet_list/korean_basic_left.js"></script>
|
||||||
@@ -66,7 +67,6 @@
|
|||||||
<script src="../../game/typing/lib/keyboard.js"></script>
|
<script src="../../game/typing/lib/keyboard.js"></script>
|
||||||
|
|
||||||
<script src="../../game/typing/whac_a_mole/define_variables.js"></script>
|
<script src="../../game/typing/whac_a_mole/define_variables.js"></script>
|
||||||
<script src="../../game/typing/whac_a_mole/stage_timer.js"></script>
|
|
||||||
<!-- <script src="../../game/typing/whac_a_mole/typing_score.js"></script> -->
|
<!-- <script src="../../game/typing/whac_a_mole/typing_score.js"></script> -->
|
||||||
<script src="../../game/typing/whac_a_mole/helmet.js"></script>
|
<script src="../../game/typing/whac_a_mole/helmet.js"></script>
|
||||||
<script src="../../game/typing/whac_a_mole/mole.js"></script>
|
<script src="../../game/typing/whac_a_mole/mole.js"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user