mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-21 20:46:14 -04:00
wip
This commit is contained in:
parent
277aa5682b
commit
21fa5f105e
8 changed files with 71 additions and 50 deletions
|
@ -1,18 +1,11 @@
|
|||
import {
|
||||
Ball,
|
||||
GameState,
|
||||
Level,
|
||||
PerkId,
|
||||
PerksMap,
|
||||
RunHistoryItem,
|
||||
UpgradeLike,
|
||||
} from "./types";
|
||||
import { icons, upgrades } from "./loadGameData";
|
||||
import { t } from "./i18n/i18n";
|
||||
import { clamp } from "./pure_functions";
|
||||
import { rawUpgrades } from "./upgrades";
|
||||
import { hashCode } from "./getLevelBackground";
|
||||
import { getTotalScore } from "./settings";
|
||||
import {Ball, Coin, GameState, Level, PerkId, PerksMap, RunHistoryItem, UpgradeLike,} from "./types";
|
||||
import {icons, upgrades} from "./loadGameData";
|
||||
import {t} from "./i18n/i18n";
|
||||
import {clamp} from "./pure_functions";
|
||||
import {rawUpgrades} from "./upgrades";
|
||||
import {hashCode} from "./getLevelBackground";
|
||||
import {getTotalScore} from "./settings";
|
||||
import {isOptionOn} from "./options";
|
||||
|
||||
export function describeLevel(level: Level) {
|
||||
let bricks = 0,
|
||||
|
@ -400,3 +393,14 @@ export function ballTransparency(ball: Ball, gameState: GameState) {
|
|||
1,
|
||||
);
|
||||
}
|
||||
|
||||
export function getCoinRenderColor(gameState: GameState, coin: Coin) {
|
||||
if (
|
||||
gameState.perks.metamorphosis ||
|
||||
isOptionOn("colorful_coins") ||
|
||||
gameState.perks.hypnosis ||
|
||||
gameState.perks.rainbow
|
||||
)
|
||||
return coin.color;
|
||||
return "#ffd300";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue