1.0.1 • Published 7 years ago
phaser-ondamaged-signal v1.0.1
It's dispatched after damage is applied but before the sprite is killed (if necessary).
var sprite = game.add.sprite();
sprite.onDamaged.add(function (amount, health, maxHealth){
// …
}, sprite);