diff --git a/examples/thirst.rs b/examples/thirst.rs index b7a29dd025185e61e0a50331a7ced9e256b8b6e9..34ce2315f138641ca830f638c33eb45edd58a429 100644 --- a/examples/thirst.rs +++ b/examples/thirst.rs @@ -154,11 +154,10 @@ fn main() { // Once all that's done, we just add our systems and off we go! App::build() .add_plugins(DefaultPlugins) + .add_plugin(BigBrainPlugin) .add_startup_system(init_entities.system()) .add_system(thirst_system.system()) .add_system(thirst_consideration_system.system()) .add_system(drink_action_system.system()) - // Don't forget the Thinker system itself! This is the heart of it all! - .add_system(big_brain::thinker_system.system()) .run(); } diff --git a/src/lib.rs b/src/lib.rs index f887f8ebebff305ec955556737155a04e8234387..22991884280d549036d344d01d276fc3625dbd39 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,3 +16,13 @@ mod actions; mod choices; mod considerations; mod thinker; + +use bevy::prelude::*; + +pub struct BigBrainPlugin; + +impl Plugin for BigBrainPlugin { + fn build(&self, app: &mut AppBuilder) { + app.add_system(thinker_system.system()); + } +}