Phaser.Weapon.autofire not working #2647

Closed
alverLopez opened this Issue Jul 19, 2016 · 4 comments

Projects

None yet

3 participants

@alverLopez

Hello, i'm having a problem using autofire method in Phaser.Weapon, i set that attribute to true, but nothing happens, i tried it into this code http://phaser.io/examples/v2/weapon/fire-rate#gv.

Am i missing something?

Thanks.

@photonstorm
Owner

Have you actually called fire? It needs to be started off, and then will continue after that.

@alverLopez
alverLopez commented Jul 20, 2016 edited

Yes, as soon as the weapon and its bullets are created, i set its autofire to true, then i fire but it doesn't keep firing, unless i keep the fire button pressed.

Edit: I'm using phaser 2.6.1

@photonstorm photonstorm added a commit that referenced this issue Jul 20, 2016
@photonstorm Weapon.autofire wouldn't fire after the first bullet, or until `fire`…
… was called, neither of which are requirements. If you now set this boolean the Weapon will fire continuously until you toggle it back to false (thanks @alverLopez #2647)
418c87e
@photonstorm
Owner

Thanks for submitting this issue. We have fixed this, and the fix has been pushed to the dev branch.

@JTronLabs
Contributor

Any idea when this will be published into stable? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment