-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #237 from AnthonyTornetta/233-make-asteroids-good
233 make asteroids good
- Loading branch information
Showing
32 changed files
with
792 additions
and
214 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
cosmos:test_crystal=Test Crystal |
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
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 |
---|---|---|
@@ -1,23 +1,26 @@ | ||
//! Loads all the items for cosmos & adds the item registry. | ||
// use crate::loader::{AddLoadingEvent, DoneLoadingEvent, LoadingManager}; | ||
use crate::registry; | ||
use bevy::prelude::App; | ||
use crate::loader::{AddLoadingEvent, DoneLoadingEvent, LoadingManager}; | ||
use crate::registry::{self, Registry}; | ||
use bevy::prelude::*; | ||
|
||
use super::Item; | ||
use super::{Item, DEFAULT_MAX_STACK_SIZE}; | ||
|
||
// pub fn add_cosmos_items( | ||
// mut items: ResMut<Registry<Item>>, | ||
// mut loading: ResMut<LoadingManager>, | ||
// mut end_writer: EventWriter<DoneLoadingEvent>, | ||
// mut start_writer: EventWriter<AddLoadingEvent>, | ||
// ) { | ||
// let id = loading.register_loader(&mut start_writer); | ||
// loading.finish_loading(id, &mut end_writer); | ||
// } | ||
fn add_cosmos_items( | ||
mut items: ResMut<Registry<Item>>, | ||
mut loading: ResMut<LoadingManager>, | ||
mut end_writer: EventWriter<DoneLoadingEvent>, | ||
mut start_writer: EventWriter<AddLoadingEvent>, | ||
) { | ||
let id = loading.register_loader(&mut start_writer); | ||
|
||
pub(super) fn register(app: &mut App) { | ||
items.register(Item::new("cosmos:test_crystal", DEFAULT_MAX_STACK_SIZE)); | ||
|
||
loading.finish_loading(id, &mut end_writer); | ||
} | ||
|
||
pub(super) fn register<T: States>(app: &mut App, loading_state: T) { | ||
registry::create_registry::<Item>(app); | ||
|
||
// app.add_system_set(SystemSet::on_enter(loading_state).with_system(add_cosmos_items)); | ||
app.add_systems(OnEnter(loading_state), add_cosmos_items); | ||
} |
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
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
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
Oops, something went wrong.