\ Phase 28 Session 5: Rivers & Lakes Complete - RiverSystem + LakeSystem with biome-aware water rendering"

This commit is contained in:
2025-12-15 19:23:57 +01:00
parent 61f968be6c
commit 2d0ef6d8b9
8 changed files with 949 additions and 8 deletions

View File

@@ -414,6 +414,34 @@ class Flat2DTerrainSystem {
tilesRendered++;
// 🌊 PHASE 28 SESSION 5: Check for water (rivers & lakes)
let isWater = false;
// Rivers
if (this.riverSystem && this.riverSystem.isRiver(x, y)) {
const riverColor = this.riverSystem.getRiverColor(x, y);
const waterRect = this.scene.add.rectangle(worldX, worldY, size, size, riverColor, 0.75);
waterRect.setOrigin(0, 0);
waterRect.setDepth(2);
chunk.sprites.push(waterRect);
isWater = true;
}
// Lakes (only if not already river)
if (!isWater && this.lakeSystem && this.lakeSystem.isLake(x, y)) {
const lakeColor = this.lakeSystem.getLakeColor(x, y);
const waterRect = this.scene.add.rectangle(worldX, worldY, size, size, lakeColor, 0.75);
waterRect.setOrigin(0, 0);
waterRect.setDepth(2);
chunk.sprites.push(waterRect);
isWater = true;
}
// Skip features if water tile
if (isWater) {
continue; // Skip to next tile
}
// 🌈 Apply mixed features for transitions
let features = [];