1
0
Fork 0

Fixed Ui components with alpha=0 being hoverable and clickable

This commit is contained in:
Michaël Lemaire 2017-03-23 22:22:10 +01:00
parent 40321621de
commit 78ba5bb077
2 changed files with 2 additions and 0 deletions

1
TODO
View file

@ -6,6 +6,7 @@
* Character sheet: paginate loot and shop items
* Character sheet: improve eye-catching for shop and loot section
* 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
* Ensure that tweens and particle emitters get destroyed once animation is done (or view changes)

View file

@ -26,6 +26,7 @@ module TS.SpaceTac.UI {
static fadeOut(game: Phaser.Game, obj: PIXI.DisplayObject, duration: number = 1000): void {
var tween = game.tweens.create(obj);
tween.to({ alpha: 0 }, duration);
tween.onComplete.addOnce(() => obj.visible = false);
tween.start();
}