Add new backgrounds
BIN
public/images/arenas/beach_b_1.png
Normal file
After Width: | Height: | Size: 779 B |
BIN
public/images/arenas/beach_b_2.png
Normal file
After Width: | Height: | Size: 489 B |
BIN
public/images/arenas/beach_b_3.png
Normal file
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 |
BIN
public/images/arenas/cave_b_1.png
Normal file
After Width: | Height: | Size: 909 B |
BIN
public/images/arenas/cave_b_2.png
Normal file
After Width: | Height: | Size: 706 B |
BIN
public/images/arenas/cave_b_3.png
Normal file
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 |
BIN
public/images/arenas/seabed_b_1.png
Normal file
After Width: | Height: | Size: 713 B |
BIN
public/images/arenas/seabed_b_2.png
Normal file
After Width: | Height: | Size: 708 B |
BIN
public/images/arenas/seabed_b_3.png
Normal file
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 {
|
||||
switch (biomeType) {
|
||||
case Biome.BEACH:
|
||||
case Biome.LAKE:
|
||||
case Biome.SEABED:
|
||||
case Biome.BADLANDS:
|
||||
case Biome.CAVE:
|
||||
case Biome.DESERT:
|
||||
return true;
|
||||
}
|
||||
@ -376,11 +379,11 @@ export class ArenaBase extends Phaser.GameObjects.Container {
|
||||
this.propValue = propValue === undefined
|
||||
? hasProps ? Utils.randInt(8) : 0
|
||||
: propValue;
|
||||
for (let p = 0; p < 3; p++) {
|
||||
this.props[p].setTexture(`${biomeKey}_b${hasProps ? `_${p + 1}` : ''}`);
|
||||
this.props[p].setVisible(hasProps && !!(this.propValue & (1 << p)));
|
||||
this.add(this.props[p]);
|
||||
}
|
||||
this.props.forEach((prop, p) => {
|
||||
prop.setTexture(`${biomeKey}_b${hasProps ? `_${p + 1}` : ''}`);
|
||||
prop.setVisible(hasProps && !!(this.propValue & (1 << p)));
|
||||
this.add(prop);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|