autoformat

This commit is contained in:
2025-08-12 23:18:46 -05:00
parent 16842c13f7
commit 7c877264a2
2 changed files with 8 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
//! Asteroids, implemented as a Bevy plugin. //! Asteroids, implemented as a Bevy plugin.
//! //!
//! Compile-time configurables can be found in the [`config`] module. //! Compile-time configurables can be found in the [`config`] module.
pub mod config; pub mod config;
@@ -109,7 +109,7 @@ fn spawn_camera(mut commands: Commands) {
} }
/// Player's thruster control system. /// Player's thruster control system.
/// ///
/// Checks if "W" is pressed and increases velocity accordingly. /// Checks if "W" is pressed and increases velocity accordingly.
fn input_ship_thruster( fn input_ship_thruster(
keyboard_input: Res<ButtonInput<KeyCode>>, keyboard_input: Res<ButtonInput<KeyCode>>,
@@ -142,7 +142,7 @@ fn input_ship_thruster(
} }
/// Player's rotation control system. /// Player's rotation control system.
/// ///
/// Checks if "A" or "D" is pressed and updates the player's [`AngularVelocity`] /// Checks if "A" or "D" is pressed and updates the player's [`AngularVelocity`]
/// component accordingly. /// component accordingly.
fn input_ship_rotation( fn input_ship_rotation(
@@ -164,9 +164,9 @@ fn input_ship_rotation(
} }
/// Player's gun trigger. /// Player's gun trigger.
/// ///
/// Checks if the spacebar has just been pressed, spawning a bullet if so. /// Checks if the spacebar has just been pressed, spawning a bullet if so.
/// ///
/// TODO: Hook up a timer to control weapon fire-rate. Something will have to /// TODO: Hook up a timer to control weapon fire-rate. Something will have to
/// tick those timers. Maybe this system? /// tick those timers. Maybe this system?
fn input_ship_shoot( fn input_ship_shoot(

View File

@@ -1,5 +1,5 @@
//! Systems, Components, and any other items for powering the game logic. //! Systems, Components, and any other items for powering the game logic.
//! //!
//! Where the objects (ship, asteroid, etc) carry their own behavioral systems, //! Where the objects (ship, asteroid, etc) carry their own behavioral systems,
//! the *game* keeps its main logic here. Its for ambient behaviors, like //! the *game* keeps its main logic here. Its for ambient behaviors, like
//! asteroid spawning, or eventually the flying saucer spawns. //! asteroid spawning, or eventually the flying saucer spawns.
@@ -11,10 +11,10 @@ use bevy::prelude::*;
use crate::{WorldSize, events::SpawnAsteroid, objects::AsteroidSize}; use crate::{WorldSize, events::SpawnAsteroid, objects::AsteroidSize};
/// Asteroid spawning parameters and state. /// Asteroid spawning parameters and state.
/// ///
/// This struct keeps track of the rng and timer for spawning asteroids. In the /// This struct keeps track of the rng and timer for spawning asteroids. In the
/// future it may contain additional fields to allow for more control. /// future it may contain additional fields to allow for more control.
/// ///
/// It's values are operated by the [`tick_asteroid_manager`] system. /// It's values are operated by the [`tick_asteroid_manager`] system.
#[derive(Resource)] #[derive(Resource)]
pub struct AsteroidSpawner { pub struct AsteroidSpawner {