espace Posted November 6, 2017 Share Posted November 6, 2017 hi, i have made a weapon based on this example : https://phaser.io/examples/v2/weapon/asteroids by reading the doc i don't find exactly how to send a signal each time the weapon fire . In fact i would play an animation each time the weapon fire. actually i use the same frequency of my weapon to play this animation but it's not a good solution in long-term. Link to comment Share on other sites More sharing options...
rhennig Posted November 6, 2017 Share Posted November 6, 2017 Every time the weapon is fired the signal onFire is sended. You can just use it like: weapon.onFire.add(function(){ //do what you want }); espace 1 Link to comment Share on other sites More sharing options...
espace Posted November 6, 2017 Author Share Posted November 6, 2017 exactly what i needed. Thanks and a love for you because you don't have a lot Link to comment Share on other sites More sharing options...
Recommended Posts