More cleanup
parent
b40adb1685
commit
54a1a26a2c
|
@ -2,12 +2,12 @@ use cgmath::Point2;
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
use winit::event::{ElementState, MouseButton, MouseScrollDelta, TouchPhase, VirtualKeyCode};
|
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::{
|
use crate::{
|
||||||
consts,
|
consts,
|
||||||
content::Content,
|
content::Content,
|
||||||
inputstatus::InputStatus,
|
inputstatus::InputStatus,
|
||||||
physics::{Physics, ShipHandle},
|
physics::{util, Physics, ShipHandle},
|
||||||
render::Sprite,
|
render::Sprite,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
//! This module contains high-level game control routines.
|
||||||
|
|
||||||
mod camera;
|
mod camera;
|
||||||
mod game;
|
mod game;
|
||||||
pub mod objects;
|
|
||||||
pub mod outfits;
|
pub mod outfits;
|
||||||
mod system;
|
mod system;
|
||||||
mod systemobject;
|
mod systemobject;
|
||||||
mod util;
|
|
||||||
|
|
||||||
pub use game::Game;
|
pub use game::Game;
|
||||||
pub use systemobject::SystemObject;
|
pub use systemobject::SystemObject;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
mod consts;
|
mod consts;
|
||||||
mod game;
|
mod game;
|
||||||
mod inputstatus;
|
mod inputstatus;
|
||||||
|
mod objects;
|
||||||
mod physics;
|
mod physics;
|
||||||
mod render;
|
mod render;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
//! This module contains game objects that may interact with the physics engine.
|
||||||
|
|
||||||
mod projectile;
|
mod projectile;
|
||||||
mod ship;
|
mod ship;
|
||||||
|
|
|
@ -4,8 +4,10 @@ use rapier2d::{
|
||||||
geometry::{ColliderBuilder, ColliderHandle},
|
geometry::{ColliderBuilder, ColliderHandle},
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::super::util;
|
use crate::{
|
||||||
use crate::render::{Sprite, SpriteTexture};
|
physics::util,
|
||||||
|
render::{Sprite, SpriteTexture},
|
||||||
|
};
|
||||||
|
|
||||||
pub struct ProjectileBuilder {
|
pub struct ProjectileBuilder {
|
||||||
pub rigid_body: RigidBodyBuilder,
|
pub rigid_body: RigidBodyBuilder,
|
|
@ -1,16 +1,18 @@
|
||||||
use cgmath::{Deg, EuclideanSpace, Matrix2, Rad, Vector2};
|
use cgmath::{Deg, EuclideanSpace, Matrix2, Rad, Vector2};
|
||||||
use nalgebra::vector;
|
use nalgebra::vector;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
use rapier2d::dynamics::{RigidBody, RigidBodyBuilder};
|
use rapier2d::{
|
||||||
use rapier2d::geometry::ColliderBuilder;
|
dynamics::{RigidBody, RigidBodyBuilder},
|
||||||
use rapier2d::pipeline::ActiveEvents;
|
geometry::ColliderBuilder,
|
||||||
|
pipeline::ActiveEvents,
|
||||||
|
};
|
||||||
|
|
||||||
use super::ProjectileBuilder;
|
use super::ProjectileBuilder;
|
||||||
use crate::{
|
use crate::{
|
||||||
content,
|
content,
|
||||||
game::{outfits, util},
|
game::outfits,
|
||||||
inputstatus::InputStatus,
|
inputstatus::InputStatus,
|
||||||
physics::ShipHandle,
|
physics::{util, ShipHandle},
|
||||||
render::{Sprite, SpriteTexture},
|
render::{Sprite, SpriteTexture},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
mod physics;
|
mod physics;
|
||||||
|
pub mod util;
|
||||||
mod wrapper;
|
mod wrapper;
|
||||||
|
|
||||||
pub use physics::Physics;
|
pub use physics::Physics;
|
||||||
|
|
|
@ -9,11 +9,7 @@ use rapier2d::{
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use super::{wrapper::Wrapper, ShipHandle};
|
use super::{wrapper::Wrapper, ShipHandle};
|
||||||
use crate::{
|
use crate::{content, game::outfits, objects, render::Sprite};
|
||||||
content,
|
|
||||||
game::{objects, outfits},
|
|
||||||
render::Sprite,
|
|
||||||
};
|
|
||||||
|
|
||||||
/// Keeps track of all objects in the world that we can interact with.
|
/// Keeps track of all objects in the world that we can interact with.
|
||||||
/// Also wraps our physics engine
|
/// Also wraps our physics engine
|
||||||
|
|
Loading…
Reference in New Issue