mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
Upgrade to Bevy v0.12 (#12)
* Migrate `System::pipe(...)` calls to `System::map(...)` * Migrate `EventReader::iter()` and `EventReader::into_iter()` calls to `EventReader::read()` * Migrate asset handling * Generate `*.meta` files for assets * Migrate a shader import * Fix emissive materials double-applying their emissive strength * Fix non-normalized bone weights resulting in incorrect vertex positions * Set shadow filtering to `Hardware2x2` to mitigate increase in shader compilation times
This commit is contained in:
@@ -20,7 +20,7 @@ impl Plugin for SelectionPlugin {
|
||||
app.add_systems(
|
||||
PostUpdate,
|
||||
wasm::notify_entity_selection_change
|
||||
.pipe(error)
|
||||
.map(bevy::utils::error)
|
||||
.run_if(resource_changed_or_removed::<Selection>()),
|
||||
);
|
||||
}
|
||||
@@ -47,7 +47,7 @@ fn update_selection(
|
||||
q_selectable: Query<&Selectable>,
|
||||
q_selected: Query<Entity, With<Selected>>,
|
||||
) {
|
||||
if let Some(event) = ev_select.iter().last() {
|
||||
if let Some(event) = ev_select.read().last() {
|
||||
// Clear any existing `Selected` components
|
||||
for ent in q_selected.iter() {
|
||||
cmd.entity(ent).remove::<Selected>();
|
||||
@@ -73,7 +73,7 @@ fn update_selection(
|
||||
} else {
|
||||
cmd.remove_resource::<Selection>();
|
||||
}
|
||||
} else if ev_input.iter().any(|action| {
|
||||
} else if ev_input.read().any(|action| {
|
||||
matches!(
|
||||
action,
|
||||
InputAction(Lifecycle::Stop, Action::Selection(input::Selection::Clear))
|
||||
|
||||
Reference in New Issue
Block a user