Track play time on the title screen
when's 100% attempts
This commit is contained in:
parent
e90388c2a2
commit
c8c7cd25c9
3 changed files with 12 additions and 1 deletions
|
@ -28,6 +28,7 @@ Game = (function() {
|
|||
requestAnimationFrame(gameLoop);
|
||||
|
||||
Input.refresh();
|
||||
Memory.global.time++;
|
||||
|
||||
flipScenes();
|
||||
currentScene.ticCount++;
|
||||
|
|
|
@ -10,6 +10,7 @@ Memory = (function() {
|
|||
|
||||
global: {
|
||||
keys: [],
|
||||
time: 0,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -117,7 +117,16 @@ Title = function() {
|
|||
"Save 5": "Closure",
|
||||
};
|
||||
|
||||
menu[2].text = "Slot: " + Memory.slot + " - " + (file ? list[file.lastStage] : "EMPTY");
|
||||
var playtime = "0:00";
|
||||
|
||||
if (file && file.global.time) {
|
||||
playtime = Math.floor(file.global.time / 3600) + ":"
|
||||
+ (Math.floor(file.global.time / 600) % 10) + ""
|
||||
+ (Math.floor(file.global.time / 60) % 10);
|
||||
}
|
||||
|
||||
menu[2].text = "Slot: " + Memory.slot + " - " + (file ? list[file.lastStage] : "EMPTY")
|
||||
+ " (" + playtime + ")";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue