-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa37539
commit 63d6eb3
Showing
6 changed files
with
79 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
pub mod block_pattern; | ||
mod camera; | ||
mod color_resources; | ||
mod config; | ||
mod constants; | ||
mod input; | ||
pub mod my_app; | ||
mod setup; | ||
mod sprite; | ||
mod text; | ||
mod text_resources; | ||
mod utils; | ||
mod window; | ||
|
||
pub fn run() { | ||
my_app::create_app().run(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,5 @@ | ||
mod app; | ||
mod block_pattern; | ||
mod camera; | ||
mod color_resources; | ||
mod config; | ||
mod constants; | ||
mod input; | ||
mod setup; | ||
mod sprite; | ||
mod text; | ||
mod text_resources; | ||
mod utils; | ||
mod window; | ||
extern crate my_bevy_game; | ||
|
||
fn main() { | ||
app::create_app().run(); | ||
my_bevy_game::run(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
extern crate my_bevy_game; | ||
|
||
use bevy::prelude::*; | ||
use my_bevy_game::*; | ||
|
||
fn init_game_app() -> App { | ||
let mut app = App::new(); | ||
|
||
app.add_plugins(MinimalPlugins); | ||
my_app::setup(&mut app); | ||
|
||
app | ||
} | ||
|
||
#[test] | ||
fn test_app_creation() { | ||
let app = init_game_app(); | ||
|
||
let block_patterns = app | ||
.world | ||
.get_resource::<block_pattern::BlockPatterns>() | ||
.unwrap(); | ||
|
||
assert_eq!(block_patterns.len(), 7); | ||
} |