Track total play time and added meta description

This commit is contained in:
Renan LE CARO 2025-02-27 23:04:42 +01:00
parent 84f4b3155e
commit 384cbd7df8
4 changed files with 11 additions and 2 deletions

1
.gitignore vendored
View file

@ -15,3 +15,4 @@
local.properties local.properties
node_modules node_modules
*.zip *.zip
app/release/app-release.aab

Binary file not shown.

View file

@ -1390,12 +1390,19 @@ function addToTotalScore(points) {
} }
} }
function addToTotalPlayTime(ms) {
try {
localStorage.setItem('breakout_71_total_play_time', JSON.stringify(JSON.parse(localStorage.getItem('breakout_71_total_play_time') || '0') + ms))
} catch (e) {
}
}
function gameOver(title, intro) { function gameOver(title, intro) {
if (!running) return; if (!running) return;
pause(true) pause(true)
stopRecording() stopRecording()
addToTotalPlayTime(runStatistics.runTime)
runStatistics.max_level = currentLevel+1 runStatistics.max_level = currentLevel+1
let animationDelay = -300 let animationDelay = -300
@ -2639,7 +2646,7 @@ async function openSettingsPanel() {
}, },
{ {
text: 'Unlocks', text: 'Unlocks',
help: "See and try what you've unlocked", help: "See perks and levels you unlocked",
async value() { async value() {
const ts = getTotalScore() const ts = getTotalScore()
const actions = [...upgrades const actions = [...upgrades

View file

@ -8,6 +8,7 @@
/> />
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Breakout 71</title> <title>Breakout 71</title>
<meta name="description" content="A breakout game with roguelite mechanics. Break bricks, catch coins, pick upgrades, repeat. Play for free on mobile and desktop.">
<link rel="stylesheet" href="style.css?v=29011519" /> <link rel="stylesheet" href="style.css?v=29011519" />
<link rel="icon" href="./icon.svg" /> <link rel="icon" href="./icon.svg" />
</head> </head>