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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user