Skip to content

Commit

Permalink
Improve ergonomics of the Named component
Browse files Browse the repository at this point in the history
  • Loading branch information
dotellie committed Sep 7, 2018
1 parent 54c7d7b commit 90a4341
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use assets::{Loader, Source};
use core::frame_limiter::{FrameLimiter, FrameRateLimitConfig, FrameRateLimitStrategy};
use core::shrev::{EventChannel, ReaderId};
use core::timing::{Stopwatch, Time};
use core::Named;
use ecs::common::Errors;
use ecs::prelude::{Component, World};
use error::{Error, Result};
Expand Down Expand Up @@ -441,6 +442,8 @@ impl<S, E: Send + Sync + 'static> ApplicationBuilder<S, E> {
world.add_resource(Stopwatch::default());
world.add_resource(Time::default());

world.register::<Named>();

Ok(ApplicationBuilder {
initial_state,
world,
Expand Down
1 change: 1 addition & 0 deletions src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ pub use ecs::prelude::{Builder, World};
pub use game_data::{DataInit, GameData, GameDataBuilder};
pub use state::{EmptyState, EmptyTrans, SimpleState, SimpleTrans, State, StateData, Trans};
pub use state_event::StateEvent;
pub use core::WithNamed;

0 comments on commit 90a4341

Please sign in to comment.