Browse Source

rename com to components

Getty Ritter 4 years ago
parent
commit
8ff9a520f7
6 changed files with 9 additions and 9 deletions
  1. 0 0
      src/components.rs
  2. 2 2
      src/main.rs
  3. 1 1
      src/res.rs
  4. 4 4
      src/sys/drawing.rs
  5. 1 1
      src/sys/input.rs
  6. 1 1
      src/sys/physics.rs

src/com.rs → src/components.rs


+ 2 - 2
src/main.rs

@@ -13,7 +13,7 @@ mod nc {
 }
 use specs::world::WorldExt;
 
-pub mod com;
+pub mod components;
 pub mod consts;
 pub mod game;
 pub mod res;
@@ -58,7 +58,7 @@ impl EventHandler for MyGame {
 
 fn main() -> Result<(), ggez::error::GameError> {
     let mut world = specs::World::new();
-    com::register(&mut world);
+    components::register(&mut world);
 
     world.insert(ncollide2d::world::CollisionWorld::<f32, specs::Entity>::new(0.1));
     res::world_from_file(&mut world, "assets/main.tmx");

+ 1 - 1
src/res.rs

@@ -1,4 +1,4 @@
-use crate::com::*;
+use crate::components::*;
 use crate::consts;
 use crate::types::World;
 

+ 4 - 4
src/sys/drawing.rs

@@ -1,4 +1,4 @@
-use crate::com::{self, Position, Sprite};
+use crate::components::{self, Position, Sprite};
 use crate::consts;
 use crate::game::MyGame;
 
@@ -47,17 +47,17 @@ pub fn systems(game: &mut MyGame, ctx: &mut Context) -> ggez::GameResult<()> {
 
     Draw {
         ctx,
-        _phase: com::Background,
+        _phase: components::Background,
     }
     .run_now(&game.world);
     Draw {
         ctx,
-        _phase: com::Foreground,
+        _phase: components::Foreground,
     }
     .run_now(&game.world);
     Draw {
         ctx,
-        _phase: com::Decoration,
+        _phase: components::Decoration,
     }
     .run_now(&game.world);
 

+ 1 - 1
src/sys/input.rs

@@ -1,4 +1,4 @@
-use crate::com::{Controlled, Velocity};
+use crate::components::{Controlled, Velocity};
 use crate::game::MyGame;
 use crate::res::KeySet;
 

+ 1 - 1
src/sys/physics.rs

@@ -1,4 +1,4 @@
-use crate::com::{Blocking, Collision, Position, Velocity};
+use crate::components::{Blocking, Collision, Position, Velocity};
 use crate::game::MyGame;
 use crate::types::World;