I'm stealing the thruster mesh, which itself is actually the ship's
mesh, to draw the debris particles. I'll come back and make the scatter
a bit better at some point, but for now it's passable.
There is now a `Weapon` component which is just a timer for the gun's
fire rate. It is ticked every frame, clamping at the "ready" state (0
time remaining).
The ship spawns with this thing, and the `input_ship_shoot` system has
been updated to use it.
I've taken a lot directly from the Bevy UI button example.
(https://bevy.org/examples/ui-user-interface/button/)
I'll make it look better later. For now, it just needs to exist. Onward
to the UI operation system!
The spacebar fires the gun, bullets are spawned on top of the ship with
a velocity that sends them forward (relative to the ship).
I still need a despawn mechanism, and a fire rate control. To despawn
things, I'm already planning a `Lifetime` component. For rate of fire,
an additional component will be created and attached to the player ship.
The ship in Asteroids isn't expected to spin up while holding a steering
direction, but that's exactly what I just made it do.
Fix that problem by assigning, not accumulating, the angular velocity
for the ship.
I'm finally getting around to centralizing all the assets instead of
letting spawners load their own.
I'm missing some assets, which may eventually be filled by textures
instead of solid-colors and simple shapes
I also need to hook up all the functions to use this thing instead.
The WorldSize is a Resource so that I can use it in the entity wrapping
system. The size is pulled from a public constant in the config.rs file,
and the window is made that same size.
The ship, such as it is, exists and moves when the player presses "W".
Position is updated according to velocity, and the mesh transform is
updated to match the position.