0.1.1 • Published 9 years ago

voxel-health v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

voxel-health

Stores player health value (voxel.js plugin)

Build Status

(for UI, see also voxel-health-bar)

Usage

Load with voxel-plugins, options:

  • maxHealth (10), minHealth (0): valid health value range, outside will be clamped
  • startHealth (defaults to maxHealth): initial starting health value

API

Methods:

  • hurt(amount)
  • heal(amount)

Events:

  • health: emitted with new and old value on any change
  • hurt, heal: emitted when hurt and healed, respectively
  • die: emitted when health reaches minimum

License

MIT

0.1.1

9 years ago

0.1.0

11 years ago