Browse Source

Remove silly types module

Getty Ritter 2 years ago
parent
commit
a3e0d9fd98
5 changed files with 3 additions and 6 deletions
  1. 2 1
      src/components.rs
  2. 0 1
      src/main.rs
  3. 0 1
      src/resources.rs
  4. 1 2
      src/sys/physics.rs
  5. 0 1
      src/types.rs

+ 2 - 1
src/components.rs

@@ -1,7 +1,8 @@
-use crate::types::World;
 use specs::world::WorldExt;
 use specs::{Component, NullStorage, VecStorage};
 
+pub type World = ncollide2d::world::CollisionWorld<f32, specs::Entity>;
+
 /// Register all the components with the world.
 pub fn register(world: &mut specs::World) {
     world.register::<Position>();

+ 0 - 1
src/main.rs

@@ -6,7 +6,6 @@ pub mod consts;
 pub mod game;
 pub mod resources;
 pub mod sys;
-pub mod types;
 
 fn main() -> Result<(), ggez::error::GameError> {
     // Make a Context and an EventLoop.

+ 0 - 1
src/resources.rs

@@ -1,6 +1,5 @@
 use crate::components::*;
 use crate::consts;
-use crate::types::World;
 
 use specs::world::{Builder, WorldExt};
 use std::path::Path;

+ 1 - 2
src/sys/physics.rs

@@ -1,6 +1,5 @@
-use crate::components::{Blocking, Collision, Position, Velocity};
+use crate::components::{Blocking, Collision, Position, Velocity, World};
 use crate::game::MyGame;
-use crate::types::World;
 
 use nalgebra::{Isometry2, Vector2};
 use specs::{Join, RunNow};

+ 0 - 1
src/types.rs

@@ -1 +0,0 @@
-pub type World = ncollide2d::world::CollisionWorld<f32, specs::Entity>;