Add power plant background

pull/16/head
Flashfyre 2024-03-17 16:47:49 -04:00
parent 33ba66b236
commit a05189120c
9 changed files with 148 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

View File

@ -0,0 +1,146 @@
{
"textures": [
{
"image": "power_plant_b_3.png",
"format": "RGBA8888",
"size": {
"w": 121,
"h": 49
},
"scale": 1,
"frames": [
{
"filename": "0003.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 320,
"h": 132
},
"spriteSourceSize": {
"x": 243,
"y": 24,
"w": 43,
"h": 49
},
"frame": {
"x": 0,
"y": 0,
"w": 43,
"h": 49
}
},
{
"filename": "0004.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 320,
"h": 132
},
"spriteSourceSize": {
"x": 243,
"y": 24,
"w": 43,
"h": 49
},
"frame": {
"x": 0,
"y": 0,
"w": 43,
"h": 49
}
},
{
"filename": "0005.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 320,
"h": 132
},
"spriteSourceSize": {
"x": 243,
"y": 24,
"w": 42,
"h": 49
},
"frame": {
"x": 43,
"y": 0,
"w": 42,
"h": 49
}
},
{
"filename": "0006.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 320,
"h": 132
},
"spriteSourceSize": {
"x": 243,
"y": 24,
"w": 42,
"h": 49
},
"frame": {
"x": 43,
"y": 0,
"w": 42,
"h": 49
}
},
{
"filename": "0001.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 320,
"h": 132
},
"spriteSourceSize": {
"x": 243,
"y": 26,
"w": 36,
"h": 47
},
"frame": {
"x": 85,
"y": 0,
"w": 36,
"h": 47
}
},
{
"filename": "0002.png",
"rotated": false,
"trimmed": true,
"sourceSize": {
"w": 320,
"h": 132
},
"spriteSourceSize": {
"x": 243,
"y": 26,
"w": 36,
"h": 47
},
"frame": {
"x": 85,
"y": 0,
"w": 36,
"h": 47
}
}
]
}
],
"meta": {
"app": "https://www.codeandweb.com/texturepacker",
"version": "3.0",
"smartupdate": "$TexturePacker:SmartUpdate:04e5900ac6a3fd4ccfeda669259f92e5:c979055bd7bcf0c5e68d1732e2822670:9f608f85fe0088569af7e43cae7fd48a$"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 643 B

View File

@ -332,7 +332,7 @@ export default class BattleScene extends Phaser.Scene {
this.loadAtlas(baseBKey, 'arenas'); this.loadAtlas(baseBKey, 'arenas');
if (getBiomeHasProps(bt)) { if (getBiomeHasProps(bt)) {
for (let p = 1; p <= 3; p++) { for (let p = 1; p <= 3; p++) {
const isPropAnimated = p === 3 && btKey === 'end'; const isPropAnimated = p === 3 && [ 'power_plant', 'end' ].find(b => b === btKey);
const propKey = `${btKey}_b_${p}`; const propKey = `${btKey}_b_${p}`;
if (!isPropAnimated) if (!isPropAnimated)
this.loadImage(propKey, 'arenas'); this.loadImage(propKey, 'arenas');

View File

@ -564,8 +564,6 @@ export class Arena {
export function getBiomeKey(biome: Biome): string { export function getBiomeKey(biome: Biome): string {
switch (biome) { switch (biome) {
case Biome.POWER_PLANT:
return 'ruins';
case Biome.METROPOLIS: case Biome.METROPOLIS:
return 'slum'; return 'slum';
case Biome.JUNGLE: case Biome.JUNGLE:
@ -587,6 +585,7 @@ export function getBiomeHasProps(biomeType: Biome): boolean {
case Biome.DESERT: case Biome.DESERT:
case Biome.ICE_CAVE: case Biome.ICE_CAVE:
case Biome.MEADOW: case Biome.MEADOW:
case Biome.POWER_PLANT:
case Biome.VOLCANO: case Biome.VOLCANO:
case Biome.GRAVEYARD: case Biome.GRAVEYARD:
case Biome.FACTORY: case Biome.FACTORY: