Implement basic gun controller
All checks were successful
Basic checks / Basic build-and-test supertask (push) Successful in 7m3s

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.
This commit is contained in:
2025-08-10 13:30:42 -05:00
parent dea8a0dc1a
commit 65f28e832f
5 changed files with 55 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ use crate::WorldSize;
use bevy::prelude::*;
#[derive(Component)]
#[derive(Clone, Component)]
pub(crate) struct Velocity(pub(crate) bevy::math::Vec2);
#[derive(Component)]