Minor visual improvements

This commit is contained in:
simon 2018-03-11 12:56:42 -04:00
parent cac4b4ae89
commit fc3b9f1d1a
6 changed files with 572 additions and 525 deletions

View File

@ -716,20 +716,25 @@ class VaultDoor extends GameObject {
public onTileHover() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 25}, 200, Phaser.Easing.Quadratic.InOut, true);
mar.game.add.tween(this).to({isoZ: 14}, 200, Phaser.Easing.Quadratic.InOut, true);
mar.game.add.tween(this.scale).to({x: 1.06, y: 1.06}, 200, Phaser.Easing.Linear.None, true);
// this.tint = config.cubotHoverTint;
this.tint = config.cubotHoverTint;
this.text.visible = true;
document.body.style.cursor = 'pointer';
document.body.setAttribute("title", "Click to visit Vault")
}
public onTileExit() {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({isoZ: 15}, 400, Phaser.Easing.Bounce.Out, true);
mar.game.add.tween(this).to({isoZ: 0}, 400, Phaser.Easing.Bounce.Out, true);
mar.game.add.tween(this.scale).to({x: 1, y: 1}, 200, Phaser.Easing.Linear.None, true);
// this.tint = config.cubotTint;
this.tint = config.cubotTint;
this.text.visible = false;
document.body.style.cursor = 'default';
document.body.setAttribute("title", "")
}
public updateObject(json) {
@ -737,14 +742,20 @@ class VaultDoor extends GameObject {
}
constructor(json) {
super(Util.getIsoX(json.x), Util.getIsoY(json.y), 15, "sheet", "objects/biomass/idle/0001");
this.tint = 0xff232a;
this.anchor.set(0.5, 0);
super(Util.getIsoX(json.x), Util.getIsoY(json.y), 0, "sheet", "objects/VaultDoorCrop");
this.anchor.set(0.5, 0.55);
this.inputEnabled = true;
this.events.onInputDown.add(function(self: VaultDoor) {
Debug.goToHex("7FFF", "7FFF", "v" + self.id + "-")
document.body.style.cursor = 'default';
document.body.setAttribute("title", "")
}, this);
this.setText("Vault");
this.text.visible = false;
this.id = json.i;
this.tileX = json.x;
this.tileY = json.y;

View File

@ -138,7 +138,7 @@ class WallTile extends Tile {
class VaultWallTile extends Tile {
constructor(x: number, y: number) {
super(x, y, config.wallSprite, 0.2);
super(x, y, config.wallSprite2, 0.29);
this.baseTint = config.vaultWallTint;
this.tint = this.baseTint;

View File

@ -272,8 +272,8 @@ var config = {
portalTint: 0xff43c8,
tileTint: 0xFFFFFF,
wallTint: 0xDDDDDD,
vaultWallTint: 0x3f1c1c,
vaultFloorTint: 0x3452C2A,
vaultWallTint: 0x3F2D2A,
vaultFloorTint: 0x2B1E1C,
oreTint: 0xF3F3F3,
cubotHoverTint: 0x00FF00,
cubotTint: 0xFFFFFF,
@ -291,6 +291,7 @@ var config = {
copperFill: "#C87D38",
plainSprite: "tiles/tile",
wallSprite: "tiles/bigTile",
wallSprite2: "tiles/bigTile2",
walkDuration: 800,
holoStyle: function (fill) {
return {
@ -432,6 +433,9 @@ var Debug = (function () {
Debug.chargeShield = function (objectId, amount) {
mar.client.sendDebugCommand({ t: "debug", command: "chargeShield", objectId: objectId, amount: amount });
};
Debug.setEnergy = function (objectId, amount) {
mar.client.sendDebugCommand({ t: "debug", command: "setEnergy", objectId: objectId, amount: amount });
};
return Debug;
}());
DEBUG = false; // todo remove
@ -1393,9 +1397,14 @@ var RadioTower = (function (_super) {
var VaultDoor = (function (_super) {
__extends(VaultDoor, _super);
function VaultDoor(json) {
var _this = _super.call(this, Util.getIsoX(json.x), Util.getIsoY(json.y), 15, "sheet", "objects/biomass/idle/0001") || this;
_this.tint = 0xff232a;
_this.anchor.set(0.5, 0);
var _this = _super.call(this, Util.getIsoX(json.x), Util.getIsoY(json.y), 0, "sheet", "objects/VaultDoorCrop") || this;
_this.anchor.set(0.5, 0.55);
_this.inputEnabled = true;
_this.events.onInputDown.add(function (self) {
Debug.goToHex("7FFF", "7FFF", "v" + self.id + "-");
document.body.style.cursor = 'default';
document.body.setAttribute("title", "");
}, _this);
_this.setText("Vault");
_this.text.visible = false;
_this.id = json.i;
@ -1405,17 +1414,21 @@ var VaultDoor = (function (_super) {
}
VaultDoor.prototype.onTileHover = function () {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({ isoZ: 25 }, 200, Phaser.Easing.Quadratic.InOut, true);
mar.game.add.tween(this).to({ isoZ: 14 }, 200, Phaser.Easing.Quadratic.InOut, true);
mar.game.add.tween(this.scale).to({ x: 1.06, y: 1.06 }, 200, Phaser.Easing.Linear.None, true);
// this.tint = config.cubotHoverTint;
this.tint = config.cubotHoverTint;
this.text.visible = true;
document.body.style.cursor = 'pointer';
document.body.setAttribute("title", "Click to visit Vault");
};
VaultDoor.prototype.onTileExit = function () {
mar.game.tweens.removeFrom(this);
mar.game.add.tween(this).to({ isoZ: 15 }, 400, Phaser.Easing.Bounce.Out, true);
mar.game.add.tween(this).to({ isoZ: 0 }, 400, Phaser.Easing.Bounce.Out, true);
mar.game.add.tween(this.scale).to({ x: 1, y: 1 }, 200, Phaser.Easing.Linear.None, true);
// this.tint = config.cubotTint;
this.tint = config.cubotTint;
this.text.visible = false;
document.body.style.cursor = 'default';
document.body.setAttribute("title", "");
};
VaultDoor.prototype.updateObject = function (json) {
//No op
@ -1601,7 +1614,7 @@ var WallTile = (function (_super) {
var VaultWallTile = (function (_super) {
__extends(VaultWallTile, _super);
function VaultWallTile(x, y) {
var _this = _super.call(this, x, y, config.wallSprite, 0.2) || this;
var _this = _super.call(this, x, y, config.wallSprite2, 0.29) || this;
_this.baseTint = config.vaultWallTint;
_this.tint = _this.baseTint;
_this.tileType = "vault wall";

View File

@ -9,8 +9,8 @@ let config = {
portalTint: 0xff43c8,
tileTint: 0xFFFFFF,
wallTint: 0xDDDDDD,
vaultWallTint: 0x3f1c1c,
vaultFloorTint: 0x3452C2A,
vaultWallTint: 0x3F2D2A,
vaultFloorTint: 0x2B1E1C,
oreTint: 0xF3F3F3,
cubotHoverTint: 0x00FF00,
cubotTint: 0xFFFFFF,
@ -28,6 +28,7 @@ let config = {
copperFill: "#C87D38",
plainSprite: "tiles/tile",
wallSprite: "tiles/bigTile",
wallSprite2: "tiles/bigTile2",
walkDuration: 800, //walk animation duration in ms
holoStyle: (fill: string) => {
return {
@ -196,6 +197,10 @@ class Debug {
mar.client.sendDebugCommand({t:"debug", command: "chargeShield", objectId: objectId, amount: amount});
}
public static setEnergy(objectId, amount) {
mar.client.sendDebugCommand({t:"debug", command: "setEnergy", objectId: objectId, amount: amount});
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 663 KiB

After

Width:  |  Height:  |  Size: 612 KiB