Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 160a389

Browse files
committed
Release v0.8.0-rc.0
1 parent ae60ff9 commit 160a389

File tree

7 files changed

+20
-18
lines changed

7 files changed

+20
-18
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.8.0
2+
3+
- Updated to Bevy `0.14.0`
4+
15
# 0.7.0
26

37
- Changed: Updated to Bevy `0.13`.

Cargo.toml

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ resolver = "2"
66

77
[package]
88
name = "bevy_eventlistener"
9-
version = "0.7.0"
9+
version = "0.8.0-rc.0"
1010
edition = "2021"
1111
description = "Event listeners and callbacks for bevy"
1212
license = "MIT OR Apache-2.0"
@@ -15,14 +15,14 @@ keywords = ["gamedev", "bevy", "eventlistener", "callbacks"]
1515
categories = ["game-engines", "rendering"]
1616

1717
[dependencies]
18-
bevy_eventlistener_derive = { path = "macros", version = "0.7.0" }
19-
bevy_ecs = "0.13"
20-
bevy_app = "0.13"
21-
bevy_utils = "0.13"
22-
bevy_hierarchy = "0.13"
18+
bevy_eventlistener_derive = { path = "macros", version = "0.8.0-rc.0" }
19+
bevy_ecs = "0.14.0-rc.2"
20+
bevy_app = "0.14.0-rc.2"
21+
bevy_utils = "0.14.0-rc.2"
22+
bevy_hierarchy = "0.14.0-rc.2"
2323

2424
[dev-dependencies]
25-
bevy = { version = "0.13", default-features = false, features = [
25+
bevy = { version = "0.14.0-rc.2", default-features = false, features = [
2626
"bevy_winit",
2727
"x11",
2828
] }

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ The runtime cost of each event decreases as the total number of events increase,
7474

7575
|bevy|bevy\_eventlistener|
7676
|----|---|
77+
|0.14|0.8|
7778
|0.13|0.7|
7879
|0.12|0.6|
7980
|0.11|0.5|

examples/minimal.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,6 @@ fn take_damage(
114114
} else {
115115
warn!("💀 {} has died a gruesome death", name);
116116
commands.entity(attack.listener()).despawn_recursive();
117-
app_exit.send(bevy::app::AppExit);
117+
app_exit.send(bevy::app::AppExit::Success);
118118
}
119119
}

macros/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bevy_eventlistener_derive"
3-
version = "0.7.0"
3+
version = "0.8.0-rc.0"
44
edition = "2021"
55
description = "Event listeners and callbacks for bevy"
66
license = "MIT OR Apache-2.0"

src/event_listener.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
use std::marker::PhantomData;
55

66
use crate::callbacks::{CallbackSystem, ListenerInput};
7-
use bevy_ecs::{
8-
prelude::*,
9-
system::{Command, EntityCommands},
10-
};
7+
use bevy_ecs::{prelude::*, system::EntityCommands, world::Command};
118
#[cfg(feature = "trace")]
129
use bevy_utils::tracing::error;
1310

src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ fn replace_listener() {
111111

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

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

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

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

148148
let (sender, receiver) = std::sync::mpsc::channel();
149149
let mut app = App::new();
150-
let entity = app.world.spawn_empty().id();
150+
let entity = app.world_mut().spawn_empty().id();
151151
app.add_plugins(MinimalPlugins)
152152
.add_plugins(EventListenerPlugin::<Foo>::default())
153153
.add_systems(Update, move |mut event: EventWriter<Foo>| {
@@ -162,7 +162,7 @@ fn replace_listener_in_callback() {
162162
commands.insert(On::<Foo>::run(move || sender2.send("two").unwrap()));
163163
},
164164
);
165-
app.world.entity_mut(entity).insert(callback);
165+
app.world_mut().entity_mut(entity).insert(callback);
166166
app.update();
167167
app.update();
168168

0 commit comments

Comments
 (0)