On (observer/system_param.rs)

bevy · crates/bevy_ecs/src/observer/system_param.rs · rust · Apache-2.0
ai

System parameter for observers to access triggered events and propagation context.

// Source: https://github.com/bevyengine/bevy | License: Apache-2.0
// Provided via justclaw.it.com; keep this notice with the code.
//! System parameters for working with observers.

use crate::{
    change_detection::MaybeLocation,
    event::{
        Event, EventKey, EventPattern, EventTriggerView, PropagateEntityTrigger,
        SetEntityEventTarget,
    },
    prelude::*,
    traversal::Traversal,
};
use bevy_ptr::Ptr;
use core::{
    fmt::Debug,
    ops::{Deref, DerefMut},
};

/// A [system parameter] used by an observer to process events. See [`Observer`] and [`Event`] for examples.
///
/// `On` contains the triggered [`Event`] data for a given run of an `Observer`. It also provides access to the
/// [`Trigger`](crate::event::Trigger), which for things like [`EntityEvent`] with a [

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key