From ebc3ccfea4027a3eb0c80f6a3d64b6425d32d1ef Mon Sep 17 00:00:00 2001 From: Silas Bartha Date: Mon, 3 Jun 2024 20:00:08 -0400 Subject: Initial Commit --- src/lib.rs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/lib.rs (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..6b46502 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,32 @@ +#![warn(missing_docs)] + +//! Plugin for bevy engine enabling interaction with and representation of the file system in the world. + +use std::path::PathBuf; + +use bevy::prelude::*; +use events::DirworldNavigationEvent; +use resources::{Dirworld, DirworldConfig}; + +/// Components used by this plugin +pub mod components; + +/// Events used by this plugin +pub mod events; + +/// Resources used by this plugin +pub mod resources; + +/// Plugin which enables high-level interaction +pub struct DirworldPlugin { + /// Root path of world + pub path: PathBuf, +} + +impl Plugin for DirworldPlugin { + fn build(&self, app: &mut App) { + app.insert_resource(DirworldConfig::new(self.path.clone())) + .add_event::() + .init_resource::(); + } +} -- cgit v1.2.3