An open API service indexing awesome lists of open source software.

https://github.com/samme/phaser-ondamaged-signal

Adds Phaser.Sprite#onDamaged signal
https://github.com/samme/phaser-ondamaged-signal

phaser

Last synced: 3 months ago
JSON representation

Adds Phaser.Sprite#onDamaged signal

Awesome Lists containing this project

README

        

It's dispatched after damage is applied but **before** the sprite is killed (if necessary).

```javascript
var sprite = game.add.sprite();

sprite.onDamaged.add(function (amount, health, maxHealth){
// …
}, sprite);
```