Add new backgrounds
After Width: | Height: | Size: 779 B |
After Width: | Height: | Size: 489 B |
After Width: | Height: | Size: 694 B |
Before Width: | Height: | Size: 644 B After Width: | Height: | Size: 637 B |
Before Width: | Height: | Size: 588 B After Width: | Height: | Size: 943 B |
Before Width: | Height: | Size: 1014 B After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 909 B |
After Width: | Height: | Size: 706 B |
After Width: | Height: | Size: 766 B |
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 523 B After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1005 B After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 713 B |
After Width: | Height: | Size: 708 B |
After Width: | Height: | Size: 734 B |
Before Width: | Height: | Size: 621 B After Width: | Height: | Size: 640 B |
13
src/arena.ts
|
@ -328,8 +328,11 @@ export function getBiomeKey(biome: Biome): string {
|
||||||
|
|
||||||
export function getBiomeHasProps(biomeType: Biome): boolean {
|
export function getBiomeHasProps(biomeType: Biome): boolean {
|
||||||
switch (biomeType) {
|
switch (biomeType) {
|
||||||
|
case Biome.BEACH:
|
||||||
case Biome.LAKE:
|
case Biome.LAKE:
|
||||||
|
case Biome.SEABED:
|
||||||
case Biome.BADLANDS:
|
case Biome.BADLANDS:
|
||||||
|
case Biome.CAVE:
|
||||||
case Biome.DESERT:
|
case Biome.DESERT:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -376,11 +379,11 @@ export class ArenaBase extends Phaser.GameObjects.Container {
|
||||||
this.propValue = propValue === undefined
|
this.propValue = propValue === undefined
|
||||||
? hasProps ? Utils.randInt(8) : 0
|
? hasProps ? Utils.randInt(8) : 0
|
||||||
: propValue;
|
: propValue;
|
||||||
for (let p = 0; p < 3; p++) {
|
this.props.forEach((prop, p) => {
|
||||||
this.props[p].setTexture(`${biomeKey}_b${hasProps ? `_${p + 1}` : ''}`);
|
prop.setTexture(`${biomeKey}_b${hasProps ? `_${p + 1}` : ''}`);
|
||||||
this.props[p].setVisible(hasProps && !!(this.propValue & (1 << p)));
|
prop.setVisible(hasProps && !!(this.propValue & (1 << p)));
|
||||||
this.add(this.props[p]);
|
this.add(prop);
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|