This commit is contained in:
Renan LE CARO 2025-04-12 20:58:24 +02:00
parent 19ee1d0d33
commit 34f6aed001
11 changed files with 29 additions and 16 deletions

View file

@ -29,8 +29,8 @@ android {
applicationId = "me.lecaro.breakout" applicationId = "me.lecaro.breakout"
minSdk = 21 minSdk = 21
targetSdk = 34 targetSdk = 34
versionCode = 29074681 versionCode = 29074738
versionName = "29074681" versionName = "29074738"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables { vectorDrawables {
useSupportLibrary = true useSupportLibrary = true

File diff suppressed because one or more lines are too long

19
dist/index.html vendored

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
// The version of the cache. // The version of the cache.
const VERSION = "29074681"; const VERSION = "29074738";
// The name of the cache // The name of the cache
const CACHE_NAME = `breakout-71-${VERSION}`; const CACHE_NAME = `breakout-71-${VERSION}`;

View file

@ -1 +1 @@
"29074681" "29074738"

View file

@ -70,6 +70,9 @@ canvas:not(#game) {
color: gold; color: gold;
transition: color 0.01s; transition: color 0.01s;
} }
&.hidden {
display: none;
}
span { span {
color: rgba(255, 255, 255, 0.8); color: rgba(255, 255, 255, 0.8);

View file

@ -983,6 +983,9 @@ document.addEventListener("keyup", async (e) => {
!alertsOpen && !alertsOpen &&
pageLoad < Date.now() - 500 pageLoad < Date.now() - 500
) { ) {
if (gameState.computer_controlled) {
return startComputerControlledGame();
}
// When doing ctrl + R in dev to refresh, i don't want to instantly restart a run // When doing ctrl + R in dev to refresh, i don't want to instantly restart a run
if (await confirmRestart(gameState)) { if (await confirmRestart(gameState)) {
restart({ restart({

View file

@ -95,7 +95,7 @@ function computerControl(gameState: GameState) {
if (coinsCount) { if (coinsCount) {
targetX = coinsTotalX / coinsCount; targetX = coinsTotalX / coinsCount;
} else { } else {
targetX = ball.x; targetX = gameState.canvasWidth / 2;
} }
} }

View file

@ -334,7 +334,7 @@
"upgrades.respawn.tooltip": "{{percent}}% of bricks re-spawn after {{delay}}s.", "upgrades.respawn.tooltip": "{{percent}}% of bricks re-spawn after {{delay}}s.",
"upgrades.respawn.verbose_description": "Some particle effect will let you know where bricks will appear. ", "upgrades.respawn.verbose_description": "Some particle effect will let you know where bricks will appear. ",
"upgrades.right_is_lava.name": "Avoid right side", "upgrades.right_is_lava.name": "Avoid right side",
"upgrades.right_is_lava.tooltip": "+{{lvl}} combo per brick. Combo resets if ball hits the left side of the screen", "upgrades.right_is_lava.tooltip": "+{{lvl}} combo per brick. Combo resets if ball hits the right side of the screen",
"upgrades.right_is_lava.verbose_description": "Whenever you break a brick, your combo will increase by one, so you'll get one more coin from all the next bricks you break.\n\nHowever, your combo will reset as soon as your ball hits the right side. \n\nAs soon as your combo rises, the right side becomes red to remind you that you should avoid hitting them.\n", "upgrades.right_is_lava.verbose_description": "Whenever you break a brick, your combo will increase by one, so you'll get one more coin from all the next bricks you break.\n\nHowever, your combo will reset as soon as your ball hits the right side. \n\nAs soon as your combo rises, the right side becomes red to remind you that you should avoid hitting them.\n",
"upgrades.sacrifice.help_l1": "Loosing a life clears all bricks", "upgrades.sacrifice.help_l1": "Loosing a life clears all bricks",
"upgrades.sacrifice.help_over": "Loosing a life {{lvl}}x the combo then clears all bricks", "upgrades.sacrifice.help_over": "Loosing a life {{lvl}}x the combo then clears all bricks",

View file

@ -334,7 +334,7 @@
"upgrades.respawn.tooltip": "{{percent}}% кирпичей перерождаются через {{delay}}с.", "upgrades.respawn.tooltip": "{{percent}}% кирпичей перерождаются через {{delay}}с.",
"upgrades.respawn.verbose_description": "Некоторые эффекты частиц позволят вам узнать, где будут появляться кирпичи.", "upgrades.respawn.verbose_description": "Некоторые эффекты частиц позволят вам узнать, где будут появляться кирпичи.",
"upgrades.right_is_lava.name": "Избегайте правой стороны", "upgrades.right_is_lava.name": "Избегайте правой стороны",
"upgrades.right_is_lava.tooltip": "+{{lvl}} комбо за кирпич. Комбо сбрасывается, если мяч попадает в левую часть экрана", "upgrades.right_is_lava.tooltip": "+{{lvl}} комбо на кирпич. Комбо сбрасывается, если мяч попадает в правую часть экрана",
"upgrades.right_is_lava.verbose_description": "Каждый раз, когда вы разбиваете кирпич, ваше комбо увеличивается на один, так что вы получите на одну монету больше со всех следующих разбитых кирпичей.\n\nОднако, как только ваш шарик попадет в правую сторону, ваша комбинация обнулится.\n\nКак только ваше комбо увеличится, правая сторона станет красной, чтобы напомнить вам, что вы должны избегать столкновения с ней.\n", "upgrades.right_is_lava.verbose_description": "Каждый раз, когда вы разбиваете кирпич, ваше комбо увеличивается на один, так что вы получите на одну монету больше со всех следующих разбитых кирпичей.\n\nОднако, как только ваш шарик попадет в правую сторону, ваша комбинация обнулится.\n\nКак только ваше комбо увеличится, правая сторона станет красной, чтобы напомнить вам, что вы должны избегать столкновения с ней.\n",
"upgrades.sacrifice.help_l1": "Потеря жизни очищает все кирпичи", "upgrades.sacrifice.help_l1": "Потеря жизни очищает все кирпичи",
"upgrades.sacrifice.help_over": "Потеряв жизнь {{lvl}}x, комбо затем очищает все кирпичи.", "upgrades.sacrifice.help_over": "Потеряв жизнь {{lvl}}x, комбо затем очищает все кирпичи.",

View file

@ -99,7 +99,9 @@ export function render(gameState: GameState) {
`<span class="score" data-tooltip="${t("play.score_tooltip")}">$${gameState.score}</span>`; `<span class="score" data-tooltip="${t("play.score_tooltip")}">$${gameState.score}</span>`;
scoreDisplay.className = scoreDisplay.className =
gameState.lastScoreIncrease > gameState.levelTime - 500 ? "active" : ""; (gameState.computer_controlled && "hidden") ||
(gameState.lastScoreIncrease > gameState.levelTime - 500 && "active") ||
"";
// Clear // Clear
if (!isOptionOn("basic") && level.svg && level.color === "#000000") { if (!isOptionOn("basic") && level.svg && level.color === "#000000") {