farma updejt
This commit is contained in:
@@ -279,10 +279,10 @@ class TerrainSystem {
|
||||
};
|
||||
|
||||
// Place Trees dynamically during generation
|
||||
this.placeTree(x, y, terrainType.name);
|
||||
// this.placeTree(x, y, terrainType.name);
|
||||
|
||||
// Place Rocks dynamically
|
||||
this.placeRock(x, y, terrainType.name);
|
||||
// this.placeRock(x, y, terrainType.name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -699,7 +699,18 @@ class TerrainSystem {
|
||||
const sprite = this.cropPool.get();
|
||||
const screenPos = this.iso.toScreen(x, y);
|
||||
sprite.setPosition(Math.round(screenPos.x + this.offsetX), Math.round(screenPos.y + this.offsetY - voxelOffset));
|
||||
sprite.setTexture(`crop_stage_${crop.stage}`);
|
||||
|
||||
const cropType = crop.type || 'wheat';
|
||||
// Če je wheat, uporabimo 'crop_stage_' za nazaj združljivost s TextureGeneratorjem?
|
||||
// TextureGenerator dela 'crop_stage_X'.
|
||||
// Če dodam 'wheat_stage_X', moram posodobiti TextureGenerator.
|
||||
// Za zdaj:
|
||||
let textureKey = `crop_stage_${crop.stage}`;
|
||||
if (cropType === 'corn') textureKey = `corn_stage_${crop.stage}`;
|
||||
if (cropType === 'wheat' && this.scene.textures.exists('wheat_stage_1')) textureKey = `wheat_stage_${crop.stage}`;
|
||||
|
||||
sprite.setTexture(textureKey);
|
||||
|
||||
sprite.setOrigin(0.5, 1);
|
||||
// Layer Objects (da igralec hodi okoli njih)
|
||||
sprite.setDepth(this.iso.getDepth(x, y, this.iso.LAYER_OBJECTS));
|
||||
|
||||
Reference in New Issue
Block a user