Added vault door sprite and fixed bug with floppy

This commit is contained in:
simon987
2018-03-30 09:56:19 -04:00
parent fc3b9f1d1a
commit 50a252c9b4
50 changed files with 713 additions and 564 deletions

View File

@@ -16,6 +16,7 @@ enum TileType {
COPPER,
VAULT_FLOOR,
VAULT_WALL,
FLUID
}
class Tile extends Phaser.Plugin.Isometric.IsoSprite {
@@ -36,7 +37,7 @@ class Tile extends Phaser.Plugin.Isometric.IsoSprite {
/**
* Based z coordinate of the tile
*/
private baseZ: number;
protected baseZ: number;
public selected: boolean;
@@ -70,6 +71,8 @@ class Tile extends Phaser.Plugin.Isometric.IsoSprite {
return new VaultWallTile(x, y);
case -1:
return new VoidTile(x, y);
case TileType.FLUID:
return new FluidTile(x, y);
case TileType.PLAIN:
default:
return new PlainTile(x, y);
@@ -178,6 +181,21 @@ class VoidTile extends Tile {
}
}
class FluidTile extends Tile {
constructor(x: number, y: number) {
super(x, y, config.plainSprite, 0);
this.baseTint = 0x0ACED6;
this.tint = this.baseTint;
this.alpha = 0.6;
this.baseZ = -15;
this.isoZ = this.baseZ;
this.tileType = "fluid";
}
}
class IronTile extends Tile {
constructor(x: number, y: number) {