Implement basic gun controller
All checks were successful
Basic checks / Basic build-and-test supertask (push) Successful in 7m3s
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:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user