More cleanup

master
Mark 2023-12-29 16:01:15 -08:00
parent b40adb1685
commit 54a1a26a2c
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
9 changed files with 20 additions and 16 deletions

View File

@ -2,12 +2,12 @@ use cgmath::Point2;
use std::time::Instant;
use winit::event::{ElementState, MouseButton, MouseScrollDelta, TouchPhase, VirtualKeyCode};
use super::{camera::Camera, outfits, system::System, util};
use super::{camera::Camera, outfits, system::System};
use crate::{
consts,
content::Content,
inputstatus::InputStatus,
physics::{Physics, ShipHandle},
physics::{util, Physics, ShipHandle},
render::Sprite,
};

View File

@ -1,10 +1,10 @@
//! This module contains high-level game control routines.
mod camera;
mod game;
pub mod objects;
pub mod outfits;
mod system;
mod systemobject;
mod util;
pub use game::Game;
pub use systemobject::SystemObject;

View File

@ -1,6 +1,7 @@
mod consts;
mod game;
mod inputstatus;
mod objects;
mod physics;
mod render;

View File

@ -1,3 +1,5 @@
//! This module contains game objects that may interact with the physics engine.
mod projectile;
mod ship;

View File

@ -4,8 +4,10 @@ use rapier2d::{
geometry::{ColliderBuilder, ColliderHandle},
};
use super::super::util;
use crate::render::{Sprite, SpriteTexture};
use crate::{
physics::util,
render::{Sprite, SpriteTexture},
};
pub struct ProjectileBuilder {
pub rigid_body: RigidBodyBuilder,

View File

@ -1,16 +1,18 @@
use cgmath::{Deg, EuclideanSpace, Matrix2, Rad, Vector2};
use nalgebra::vector;
use rand::Rng;
use rapier2d::dynamics::{RigidBody, RigidBodyBuilder};
use rapier2d::geometry::ColliderBuilder;
use rapier2d::pipeline::ActiveEvents;
use rapier2d::{
dynamics::{RigidBody, RigidBodyBuilder},
geometry::ColliderBuilder,
pipeline::ActiveEvents,
};
use super::ProjectileBuilder;
use crate::{
content,
game::{outfits, util},
game::outfits,
inputstatus::InputStatus,
physics::ShipHandle,
physics::{util, ShipHandle},
render::{Sprite, SpriteTexture},
};

View File

@ -1,4 +1,5 @@
mod physics;
pub mod util;
mod wrapper;
pub use physics::Physics;

View File

@ -9,11 +9,7 @@ use rapier2d::{
use std::collections::HashMap;
use super::{wrapper::Wrapper, ShipHandle};
use crate::{
content,
game::{objects, outfits},
render::Sprite,
};
use crate::{content, game::outfits, objects, render::Sprite};
/// Keeps track of all objects in the world that we can interact with.
/// Also wraps our physics engine