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:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user