Create a "machinery" module for game systems

I'm not sold on the name, but anyway.

This module will hold the systems that power the main game mechanics, as
well as a few extra items to support that (in particular, the Lifetime
component).
This commit is contained in:
2025-08-11 23:25:04 -05:00
parent 93da225636
commit 34ee2fcc7d
2 changed files with 5 additions and 6 deletions

View File

@@ -1,18 +1,18 @@
mod asteroids;
pub mod config;
mod events;
mod machinery;
mod objects;
mod physics;
mod preparation_widget;
mod resources;
mod title_screen;
use crate::asteroids::AsteroidSpawner;
use crate::config::{
ASTEROID_SMALL_COLOR, BACKGROUND_COLOR, BULLET_COLOR, BULLET_LIFETIME, BULLET_SPEED,
PLAYER_SHIP_COLOR, SHIP_ROTATION, SHIP_THRUST, SHIP_THRUSTER_COLOR_ACTIVE,
SHIP_THRUSTER_COLOR_INACTIVE, WINDOW_SIZE,
};
use crate::machinery::AsteroidSpawner;
use crate::objects::{Bullet, Ship};
use crate::physics::AngularVelocity;
@@ -56,8 +56,8 @@ impl Plugin for AsteroidPlugin {
input_ship_rotation,
input_ship_shoot,
physics::wrap_entities,
asteroids::tick_asteroid_manager,
objects::spawn_asteroid.after(asteroids::tick_asteroid_manager),
machinery::tick_asteroid_manager,
objects::spawn_asteroid.after(machinery::tick_asteroid_manager),
objects::split_asteroids,
objects::bullet_impact_listener,
objects::ship_impact_listener,

View File

@@ -1,5 +1,4 @@
//! This is the module containing all the rock-related things.
//! Not... not the whole game.
//! These are Systems that power the main game mechanics (and some misc items to support them)
use rand::{Rng, SeedableRng};
use std::time::Duration;