1
0
Fork 0

Updated active effect sprites on ship list

This commit is contained in:
Michaël Lemaire 2017-01-31 22:07:59 +01:00
parent f1ef892c0b
commit 7dc4d5b810
6 changed files with 1093 additions and 291 deletions

3
TODO
View file

@ -1,7 +1,8 @@
* Use succession's tools and serializer
* Allow to cancel last moves
* Effect should be random in a range (eg. "damage target 50-75")
* Add auto-move to attack
* Add equipment info (or summary) in ship tooltip
* Escape key should cancel selected action
* Handle effects overflowing ship tooltip when too numerous
* Proper arena scaling (not graphical, only space coordinates)
* Mobile: think UI layout so that fingers do not block the view (right and left handed)

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,004 B

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 542 B

View file

@ -31,6 +31,9 @@ module TS.SpaceTac.View {
this.ship = ship;
this.active_effects = new Phaser.Group(this.game);
this.addChild(this.active_effects);
this.layer_portrait = new Phaser.Image(this.game, 8, 8, "ship-" + ship.model + "-portrait", 0);
this.layer_portrait.scale.set(0.3, 0.3);
this.addChild(this.layer_portrait);
@ -52,9 +55,6 @@ module TS.SpaceTac.View {
this.energy = ValueBar.newStyled(this.game, "battle-shiplist-energy", 106, 39, true);
this.addChild(this.energy);
this.active_effects = new Phaser.Group(this.game);
this.addChild(this.active_effects);
this.updateAttributes();
this.updateEffects();
@ -75,7 +75,7 @@ module TS.SpaceTac.View {
var spacing = (8 * (count - 1) > 72) ? 72 / (count - 1) : 8;
this.ship.sticky_effects.forEach((effect, index) => {
var x = 46 - (count - 1) * spacing / 2 + index * spacing;
var badge = new Phaser.Image(this.game, x, 85, `battle-shiplist-effect-${effect.isBeneficial() ? "good" : "bad"}`);
var badge = new Phaser.Image(this.game, x, 46, `battle-shiplist-effect-${effect.isBeneficial() ? "good" : "bad"}`);
badge.anchor.set(0.5, 0.5);
this.active_effects.addChild(badge);
});