Skip to content

Commit

Permalink
v0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
aevyrie committed Jul 20, 2024
1 parent 59cdf25 commit f22378d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.8.1

- Added the `E: EntityEvent` bound to `EventlistenerPlugin<E>`, to move compile errors from adding the plugin, to the event itself.
- Fixed a benchmark bug.

# 0.8.0

- Updated to Bevy `0.14.0`
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resolver = "2"

[package]
name = "bevy_eventlistener"
version = "0.8.0"
version = "0.8.1"
edition = "2021"
description = "Event listeners and callbacks for bevy"
license = "MIT OR Apache-2.0"
Expand Down
3 changes: 2 additions & 1 deletion benches/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ fn event_listeners(c: &mut Criterion) {
(
spawn_listener_hierarchy,
add_listeners_to_hierarchy::<DENSITY, 1>,
),
)
.chain(),
)
.add_plugins(EventListenerPlugin::<TestEvent<1>>::default())
.add_systems(First, send_events::<1, N_EVENTS>);
Expand Down
4 changes: 2 additions & 2 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ use crate::{event_dispatcher::EventDispatcher, event_listener::EntityEvent};
pub struct EventListenerSet;

/// Adds event listening and bubbling support for event `E`.
pub struct EventListenerPlugin<E>(std::marker::PhantomData<E>);
pub struct EventListenerPlugin<E: EntityEvent>(std::marker::PhantomData<E>);

impl<E> Default for EventListenerPlugin<E> {
impl<E: EntityEvent> Default for EventListenerPlugin<E> {
fn default() -> Self {
Self(std::marker::PhantomData)
}
Expand Down

0 comments on commit f22378d

Please sign in to comment.