diff options
Diffstat (limited to 'ecs/src/lib.rs')
-rw-r--r-- | ecs/src/lib.rs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs index 334fe69..3926344 100644 --- a/ecs/src/lib.rs +++ b/ecs/src/lib.rs @@ -55,7 +55,7 @@ pub use ecs_macros::{Component, Sole}; pub use crate::query::Query; -#[derive(Debug, Default)] +#[derive(Debug)] pub struct World { data: WorldData, @@ -68,7 +68,11 @@ impl World #[must_use] pub fn new() -> Self { - let mut world = Self::default(); + let mut world = Self { + data: WorldData::default(), + stop: AtomicBool::new(false), + is_first_tick: AtomicBool::new(false), + }; world.add_sole(Stats::default()).ok(); @@ -469,6 +473,14 @@ impl World } } +impl Default for World +{ + fn default() -> Self + { + Self::new() + } +} + /// The result of calling [`World::step`]. pub enum StepResult { |