mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-06-16 19:25:06 -04:00
wip
This commit is contained in:
parent
258d578ad3
commit
9731d694f3
8 changed files with 791 additions and 722 deletions
|
@ -12,6 +12,7 @@ import { t } from "./i18n/i18n";
|
|||
import { clamp } from "./pure_functions";
|
||||
import { getSettingValue, getTotalScore } from "./settings";
|
||||
import { isOptionOn } from "./options";
|
||||
import {gameCanvas} from "./render";
|
||||
|
||||
export function describeLevel(level: Level) {
|
||||
let bricks = 0,
|
||||
|
@ -345,3 +346,14 @@ export function escapeAttribute(str: String) {
|
|||
.replace(/"/gi, """)
|
||||
.replace(/'/gi, "'");
|
||||
}
|
||||
|
||||
export function canvasCenterX(gameState:GameState){
|
||||
return gameState.canvasWidth/2
|
||||
}
|
||||
export function zoneLeftBorderX(gameState:GameState){
|
||||
|
||||
return gameState.offsetXRoundedDown - 1
|
||||
}
|
||||
export function zoneRightBorderX(gameState:GameState){
|
||||
return gameCanvas.width - gameState.offsetXRoundedDown + 1
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue