1
0
Fork 0

Added level up icon on character portrait

This commit is contained in:
Michaël Lemaire 2017-04-06 20:05:20 +02:00
parent 78ba5bb077
commit 55cd64e3c7
5 changed files with 24 additions and 6 deletions

2
TODO
View file

@ -8,7 +8,7 @@
* Shops: add equipment pricing, with usage depreciation
* Fix targetting not resetting when using action shortcuts
* Add battle statistics and/or critics in outcome dialog
* Add battle experience and feedback on level up
* Add battle experience
* Ensure that tweens and particle emitters get destroyed once animation is done (or view changes)
* Highlight ships that will be included as target of current action
* Controls: Do not focus on ship while targetting for area effects (dissociate hover and target)

View file

@ -573,11 +573,11 @@
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="1.979899"
inkscape:cx="1214.6427"
inkscape:cy="366.58654"
inkscape:zoom="0.70000001"
inkscape:cx="290.06665"
inkscape:cy="536.461"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:current-layer="layer3"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1037"
@ -597,7 +597,9 @@
showborder="false"
borderlayer="false"
inkscape:showpageshadow="true"
inkscape:lockguides="true">
inkscape:lockguides="true"
inkscape:measure-start="168.929,966.071"
inkscape:measure-end="228.214,927.143">
<sodipodi:guide
position="0,0"
orientation="0,1920"
@ -1736,5 +1738,13 @@
x="0"
style="display:inline;opacity:1;filter:url(#filter4837)" />
</g>
<path
style="fill:#acf1d5;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.14867447px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6359)"
d="m 65.881955,40.338793 -5.142337,8.907111 H 63.1036 v 7.769112 h 5.556709 v -7.769112 h 2.363982 z"
id="rect4780"
inkscape:connector-curvature="0"
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/character/upgrade-available.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -102,6 +102,7 @@ module TS.SpaceTac.UI {
this.loadImage("character/slot-shield.png");
this.loadImage("character/slot-engine.png");
this.loadImage("character/slot-weapon.png");
this.loadImage("character/upgrade-available.png");
this.loadImage("character/price-tag.png");
this.loadImage("character/scroll.png");
this.loadImage("equipment/ironhull.png");

View file

@ -7,6 +7,7 @@ module TS.SpaceTac.UI {
export class CharacterFleetMember extends Phaser.Button implements CharacterEquipmentContainer {
sheet: CharacterSheet;
ship: Ship;
levelup: Phaser.Image;
constructor(sheet: CharacterSheet, x: number, y: number, ship: Ship) {
super(sheet.game, x, y, "character-ship", () => sheet.show(ship));
@ -19,6 +20,11 @@ module TS.SpaceTac.UI {
portrait_pic.anchor.set(0.5, 0.5);
this.addChild(portrait_pic);
this.levelup = new Phaser.Image(this.game, this.width / 2 - 40, -this.height / 2 + 40, "character-upgrade-available");
this.levelup.anchor.set(1, 0);
this.levelup.visible = this.ship.getAvailableUpgradePoints() > 0;
this.addChild(this.levelup);
sheet.view.tooltip.bindDynamicText(this, () => ship.name);
}
@ -27,6 +33,7 @@ module TS.SpaceTac.UI {
*/
setSelected(selected: boolean) {
this.loadTexture(selected ? "character-ship-selected" : "character-ship");
Animation.setVisibility(this.game, this.levelup, this.ship.getAvailableUpgradePoints() > 0, 200);
}
/**