From 379a2c4b4f93da67adcde247448b49dd56a5a7ec Mon Sep 17 00:00:00 2001 From: TorgaW Date: Mon, 15 Apr 2024 01:01:49 +0300 Subject: [PATCH] hotfix for terrain tiles --- src/Game/WorldGeneration/WorldGen.js | 2 +- .../WorldObjects/TerrainTile/TerrainTile.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Game/WorldGeneration/WorldGen.js b/src/Game/WorldGeneration/WorldGen.js index 1239fbf..af2b622 100644 --- a/src/Game/WorldGeneration/WorldGen.js +++ b/src/Game/WorldGeneration/WorldGen.js @@ -127,7 +127,7 @@ export function fillWorldGenChunk(chunk, x, y) { let sTint = new RGBColor(255, 255, 255).multiplyByNumber(terrainTintCue.getValueAt(res)).toNumber(); res = Math.floor(terrainCue.getValueAt(res)); - let terrainTile = new TerrainTile(); + let terrainTile = new TerrainTile(false); terrainTile.spriteSheetPath = "assets/images/world/world_terrain_atlas.png"; terrainTile.frame = new Rectangle(terrainSpriteList[res].x, terrainSpriteList[res].y, 16, 16); terrainTile.props = new TerrainTileProps(terrainTypeList[res], res*5); diff --git a/src/Game/WorldGeneration/WorldObjects/TerrainTile/TerrainTile.js b/src/Game/WorldGeneration/WorldObjects/TerrainTile/TerrainTile.js index 1f03f78..bfed181 100644 --- a/src/Game/WorldGeneration/WorldObjects/TerrainTile/TerrainTile.js +++ b/src/Game/WorldGeneration/WorldObjects/TerrainTile/TerrainTile.js @@ -33,7 +33,7 @@ export class TerrainTile extends SceneObject spriteSheetPath = ""; frame = new Rectangle(); - #printed = false; + // #printed = false; onInit() { @@ -41,12 +41,12 @@ export class TerrainTile extends SceneObject this.drawObject = getSpriteFromAtlas(this.spriteSheetPath, this.frame); }; - tick(ticker) - { - if(!this.#printed) - { - console.log(this.props); - this.#printed = true; - } - } + // tick(ticker) + // { + // if(!this.#printed) + // { + // console.log(this.props); + // this.#printed = true; + // } + // } }; \ No newline at end of file