mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-27 00:24:35 +00:00
game kind of working with GameView
This commit is contained in:
@@ -74,7 +74,7 @@ export async function createClientGame(lobbyConfig: LobbyConfig, gameConfig: Gam
|
||||
const config = getConfig(gameConfig)
|
||||
|
||||
const terrainMap = await loadTerrainMap(gameConfig.gameMap);
|
||||
const gameView = new GameView(terrainMap.map)
|
||||
const gameView = new GameView(config, terrainMap.map)
|
||||
|
||||
const worker = new WorkerClient(lobbyConfig.gameID, gameConfig)
|
||||
await worker.initialize()
|
||||
|
||||
@@ -36,7 +36,7 @@ export class UILayer implements Layer {
|
||||
const barHeight = 15;
|
||||
const barBackgroundWidth = this.transformHandler.width();
|
||||
|
||||
const ratio = this.game.ticks() / this.game.config().numSpawnPhaseTurns(this.game.config().gameConfig().gameType)
|
||||
const ratio = this.game.ticks() / this.game.config().numSpawnPhaseTurns()
|
||||
|
||||
// Draw bar background
|
||||
context.fillStyle = 'rgba(0, 0, 0, 0.5)';
|
||||
|
||||
Reference in New Issue
Block a user