fishfolk / jumpy

Tactical 2D shooter in fishy pixels style. Made with Rust-lang 🦀 and Bevy 🪶
https://fishfolk.org/games/jumpy/
Other
1.65k stars 121 forks source link

feat: port machine gun #954

Closed DRuppFv closed 6 months ago

DRuppFv commented 6 months ago

This PR closes #573.

I added bullet_spread system to the machine gun because I think it balances the game and looks good, and added empty_cooldown because it would be really boring if gun_empty.ogg kept playing at the same frequency as the normal cooldown, so in this gun we have the shooting cooldown and the empty sound cooldown. I also made a very slight change in the main system for using items because it had to be able to shoot constantly, so now you can keep shoot input pressed with any weapon.

Something I think is important to mention is that the shooting animation is synchronized to the rate of fire, so if you change the rate of fire the animation will also change. It could be easily changed with a new variable in the .yaml so let me know whether you think it should be faster or slower.

The machine gun has two states (idle and shooting) and its only function is to reset and start animations.

MaxCWhitehead commented 6 months ago

@DRuppFv It looks like the continuous integration found some issues with the formatting in machine_gun.rs, could you run cargo fmt and update this?

Thank you!