Skip to content

Commit

Permalink
Docs and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aevyrie committed Jul 2, 2023
1 parent dee6673 commit 6f5a312
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion crates/bevy_eventlistener_core/src/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ impl CallbackSystem {
}
}
}

/// A [`SystemParam`](bevy::ecs::system::SystemParam) used to get immutable access the the
/// [`ListenerInput`] for this callback.
///
Expand All @@ -44,7 +45,7 @@ pub type Listener<'w, E> = Res<'w, ListenerInput<E>>;
/// Use this in callback systems to access event data for the event that triggered the callback.
pub type ListenerMut<'w, E> = ResMut<'w, ListenerInput<E>>;

/// Data from an event that triggered an [`On<Event>`](crate::on_event::On) listener, and is
/// Data from an event that triggered an [`On<Event>`](crate::event_listener::On) listener, and is
/// currently bubbling through the entity hierarchy.
///
/// This is accessed as a bevy resource in the callback system. This resource is only available to
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_eventlistener_core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Event listening, bubbling, and callbacks.
//! Core implementation of event listening, bubbling, and callbacks.

use bevy::prelude::*;

Expand Down
13 changes: 13 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
#![deny(missing_docs)]
//! Event listening, bubbling, and callbacks.

pub use bevy_eventlistener_core::*;
pub use bevy_eventlistener_derive::EntityEvent;

/// Common exports
pub mod prelude {
pub use bevy_eventlistener_core::{
callbacks::{Listener, ListenerMut},
event_listener::{EntityEvent, On},
EventListenerPlugin,
};
pub use bevy_eventlistener_derive::EntityEvent;
}

0 comments on commit 6f5a312

Please sign in to comment.