samme Posted July 2, 2018 Share Posted July 2, 2018 https://github.com/samme/phaser-component-health Flexible, data-based health component, with events. jdotr, rex and ThomasTaylor 2 1 Quote Link to comment Share on other sites More sharing options...
jdotr Posted July 3, 2018 Share Posted July 3, 2018 Our powers combined (or something). I made a fixed/relative UI component that hooks into this Health mix: https://jdotrjs.github.io/demos/health-bar/index.html. The main caveat is that I used my nineslice plugin because I wanted to try it in a different context than I initially wrote it to test flexibility a bit. Anyway, it's definitely work-in-progress quality right now but folks are free to use it. I don't have it in a repo beyond the demos page (source direct link). Quote Link to comment Share on other sites More sharing options...
jdotr Posted July 3, 2018 Share Posted July 3, 2018 18 minutes ago, jdotr said: Anyway, it's definitely work-in-progress quality right now but folks are free to use it. I don't have it in a repo beyond the demos page (source direct link). One thing worth thinking about / changing that would make this less hacky would be to decide if it hooks in via events emitted or getHealth calls. It would be pretty easy to make that configurable. P.S. Thanks @samme, since I haven't stated that explicitly. Quote Link to comment Share on other sites More sharing options...
samme Posted July 3, 2018 Author Share Posted July 3, 2018 healthchange event is very good for drawing health bars, particles, etc. ThomasTaylor 1 Quote Link to comment Share on other sites More sharing options...
ThomasTaylor Posted August 22, 2018 Share Posted August 22, 2018 Thanks @samme this is exactly what I'm going to add to my project whenever I get home. samme 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.