Skip to content

Commit

Permalink
Release v0.8.0-rc.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aevyrie committed Jun 12, 2024
1 parent ae60ff9 commit 160a389
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.8.0

- Updated to Bevy `0.14.0`

# 0.7.0

- Changed: Updated to Bevy `0.13`.
Expand Down
14 changes: 7 additions & 7 deletions 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.7.0"
version = "0.8.0-rc.0"
edition = "2021"
description = "Event listeners and callbacks for bevy"
license = "MIT OR Apache-2.0"
Expand All @@ -15,14 +15,14 @@ keywords = ["gamedev", "bevy", "eventlistener", "callbacks"]
categories = ["game-engines", "rendering"]

[dependencies]
bevy_eventlistener_derive = { path = "macros", version = "0.7.0" }
bevy_ecs = "0.13"
bevy_app = "0.13"
bevy_utils = "0.13"
bevy_hierarchy = "0.13"
bevy_eventlistener_derive = { path = "macros", version = "0.8.0-rc.0" }
bevy_ecs = "0.14.0-rc.2"
bevy_app = "0.14.0-rc.2"
bevy_utils = "0.14.0-rc.2"
bevy_hierarchy = "0.14.0-rc.2"

[dev-dependencies]
bevy = { version = "0.13", default-features = false, features = [
bevy = { version = "0.14.0-rc.2", default-features = false, features = [
"bevy_winit",
"x11",
] }
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ The runtime cost of each event decreases as the total number of events increase,

|bevy|bevy\_eventlistener|
|----|---|
|0.14|0.8|
|0.13|0.7|
|0.12|0.6|
|0.11|0.5|
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ fn take_damage(
} else {
warn!("💀 {} has died a gruesome death", name);
commands.entity(attack.listener()).despawn_recursive();
app_exit.send(bevy::app::AppExit);
app_exit.send(bevy::app::AppExit::Success);
}
}
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_eventlistener_derive"
version = "0.7.0"
version = "0.8.0-rc.0"
edition = "2021"
description = "Event listeners and callbacks for bevy"
license = "MIT OR Apache-2.0"
Expand Down
5 changes: 1 addition & 4 deletions src/event_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
use std::marker::PhantomData;

use crate::callbacks::{CallbackSystem, ListenerInput};
use bevy_ecs::{
prelude::*,
system::{Command, EntityCommands},
};
use bevy_ecs::{prelude::*, system::EntityCommands, world::Command};
#[cfg(feature = "trace")]
use bevy_utils::tracing::error;

Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ fn replace_listener() {

let (tx, rx) = std::sync::mpsc::channel();
let mut app = App::new();
let entity = app.world.spawn_empty().id();
let entity = app.world_mut().spawn_empty().id();
app.add_plugins(MinimalPlugins)
.add_plugins(EventListenerPlugin::<Foo>::default())
.add_systems(Update, move |mut event: EventWriter<Foo>| {
Expand All @@ -121,12 +121,12 @@ fn replace_listener() {

let sender = tx.clone();
let callback = On::<Foo>::run(move || sender.send("one").unwrap());
app.world.entity_mut(entity).insert(callback);
app.world_mut().entity_mut(entity).insert(callback);
app.update();

let sender = tx.clone();
let callback = On::<Foo>::run(move || sender.send("two").unwrap());
app.world.entity_mut(entity).insert(callback);
app.world_mut().entity_mut(entity).insert(callback);
app.update();

assert_eq!(rx.recv(), Ok("one"));
Expand All @@ -147,7 +147,7 @@ fn replace_listener_in_callback() {

let (sender, receiver) = std::sync::mpsc::channel();
let mut app = App::new();
let entity = app.world.spawn_empty().id();
let entity = app.world_mut().spawn_empty().id();
app.add_plugins(MinimalPlugins)
.add_plugins(EventListenerPlugin::<Foo>::default())
.add_systems(Update, move |mut event: EventWriter<Foo>| {
Expand All @@ -162,7 +162,7 @@ fn replace_listener_in_callback() {
commands.insert(On::<Foo>::run(move || sender2.send("two").unwrap()));
},
);
app.world.entity_mut(entity).insert(callback);
app.world_mut().entity_mut(entity).insert(callback);
app.update();
app.update();

Expand Down

0 comments on commit 160a389

Please sign in to comment.