mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-23 05:26:15 -04:00
wip
This commit is contained in:
parent
f1cd138071
commit
44b9a39927
3 changed files with 7 additions and 2 deletions
4
dist/index.html
vendored
4
dist/index.html
vendored
|
@ -3716,7 +3716,9 @@ function addToScore(gameState, coin) {
|
||||||
(0, _addToTotalScore.addToTotalScore)(gameState, coin.points);
|
(0, _addToTotalScore.addToTotalScore)(gameState, coin.points);
|
||||||
if (gameState.score > gameState.highScore && !gameState.creative) {
|
if (gameState.score > gameState.highScore && !gameState.creative) {
|
||||||
gameState.highScore = gameState.score;
|
gameState.highScore = gameState.score;
|
||||||
localStorage.setItem("breakout-3-hs-short", gameState.score.toString());
|
try {
|
||||||
|
localStorage.setItem("breakout-3-hs-short", gameState.score.toString());
|
||||||
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
if (!(0, _options.isOptionOn)("basic")) makeParticle(gameState, coin.previousX, coin.previousY, (gameState.canvasWidth - coin.x) / 100, -coin.y / 100, (0, _gameUtils.getCoinRenderColor)(gameState, coin), true, gameState.coinSize / 2, 100 + Math.random() * 50);
|
if (!(0, _options.isOptionOn)("basic")) makeParticle(gameState, coin.previousX, coin.previousY, (gameState.canvasWidth - coin.x) / 100, -coin.y / 100, (0, _gameUtils.getCoinRenderColor)(gameState, coin), true, gameState.coinSize / 2, 100 + Math.random() * 50);
|
||||||
schedulGameSound(gameState, "coinCatch", coin.x, 1);
|
schedulGameSound(gameState, "coinCatch", coin.x, 1);
|
||||||
|
|
|
@ -649,7 +649,11 @@ export function addToScore(gameState: GameState, coin: Coin) {
|
||||||
addToTotalScore(gameState, coin.points);
|
addToTotalScore(gameState, coin.points);
|
||||||
if (gameState.score > gameState.highScore && !gameState.creative) {
|
if (gameState.score > gameState.highScore && !gameState.creative) {
|
||||||
gameState.highScore = gameState.score;
|
gameState.highScore = gameState.score;
|
||||||
|
try{
|
||||||
localStorage.setItem("breakout-3-hs-short", gameState.score.toString());
|
localStorage.setItem("breakout-3-hs-short", gameState.score.toString());
|
||||||
|
}catch (e){
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!isOptionOn("basic")) {
|
if (!isOptionOn("basic")) {
|
||||||
makeParticle(
|
makeParticle(
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { icons, transformRawLevel } from "./loadGameData";
|
import { icons, transformRawLevel } from "./loadGameData";
|
||||||
import { t } from "./i18n/i18n";
|
import { t } from "./i18n/i18n";
|
||||||
import {
|
import {
|
||||||
commitSettingsChangesToLocalStorage,
|
|
||||||
getSettingValue,
|
getSettingValue,
|
||||||
getTotalScore,
|
getTotalScore,
|
||||||
setSettingValue,
|
setSettingValue,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue