Implement randomized tile textures.

- DungeonGenerator: Selects a random texture from the card definition when finalizing tile placement.
- GameRenderer: Renders the specific chosen texture for each tile instance instead of the default.
This commit is contained in:
2026-01-03 00:19:30 +01:00
parent 7462dd7fed
commit cd6abb016f
2 changed files with 12 additions and 2 deletions

View File

@@ -498,7 +498,8 @@ export class GameRenderer {
// Draw Texture Plane (The Image) - WAIT FOR TEXTURE TO LOAD
if (tileDef && tileInstance && tileDef.textures && tileDef.textures.length > 0) {
const texturePath = tileDef.textures[0];
// Use specific texture if assigned (randomized), otherwise default to first
const texturePath = tileInstance.texture || tileDef.textures[0];
// Load texture with callback
this.getTexture(texturePath, (texture) => {