Ecosyste.ms: Awesome
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: 28 days ago
JSON representation
Adds Phaser.Sprite#onDamaged signal
- Host: GitHub
- URL: https://github.com/samme/phaser-ondamaged-signal
- Owner: samme
- Created: 2016-09-08T19:30:04.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-22T20:59:07.000Z (almost 8 years ago)
- Last Synced: 2024-12-17T05:41:51.104Z (about 2 months ago)
- Topics: phaser
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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);
```