Skip to content

Commit b99f6ba

Browse files
Add mod.rs instead of nest's
1 parent 7bde081 commit b99f6ba

File tree

6 files changed

+19
-28
lines changed

6 files changed

+19
-28
lines changed

src/main.rs

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,13 @@ use ggez::{
1414
};
1515
use utils::AssetManager;
1616

17+
mod screens;
1718
mod utils;
1819

19-
mod screens {
20-
pub mod menu {
21-
pub mod menu;
22-
}
23-
24-
pub mod game {
25-
pub mod components {
26-
pub mod barrel;
27-
pub mod bullet;
28-
pub mod cloud;
29-
pub mod enemy;
30-
pub mod player;
31-
pub mod tile;
32-
}
33-
34-
pub mod game;
35-
pub mod map;
36-
pub mod physics;
37-
}
38-
39-
pub mod dead {
40-
pub mod dead;
41-
}
42-
}
43-
4420
pub use screens::*;
4521

46-
const WIDTH: f32 = 2000.0;
47-
const HEIGHT: f32 = 1000.0;
22+
const WIDTH: f32 = 1000.0;
23+
const HEIGHT: f32 = 600.0;
4824

4925
fn load_assets(ctx: &mut Context) -> AssetManager {
5026
let mut asset_manager = AssetManager::new();
@@ -121,7 +97,7 @@ impl Game {
12197
let asset_manager = Rc::new(asset_manager);
12298

12399
// Woah. We are cloning the asset manager. Yes thats why its wrapped in Rc<>
124-
// and anything wrapped in a Rc<> and performs a clone only clones its pointer so its fine to use clone here!
100+
// Anything wrapped in a Rc<> and performs a clone it only clones its pointer so its fine to use clone here!
125101
Self {
126102
screen: Screen::Menu,
127103

src/screens/dead/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod dead;

src/screens/game/components/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pub mod barrel;
2+
pub mod bullet;
3+
pub mod cloud;
4+
pub mod enemy;
5+
pub mod player;
6+
pub mod tile;

src/screens/game/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pub mod components;
2+
pub mod game;
3+
pub mod map;
4+
pub mod physics;

src/screens/menu/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod menu;

src/screens/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub mod dead;
2+
pub mod game;
3+
pub mod menu;

0 commit comments

Comments
 (0)