Module valence::prelude

source ·
Expand description

Contains the most frequently used items in Valence projects.

This is usually glob imported like so:

use valence::prelude::*; // Glob import.

let mut app = App::new();
app.add_systems(Update, || println!("yippee!"));
// ...

Re-exports

Modules

Macros

  • Creates a new Ident at compile time from a string literal. A compile error is raised if the string is not a valid resource identifier.

Structs

Enums

Traits

Functions

  • Generates a Condition-satisfying closure that returns true if there are any entity with a component of the given type removed.
  • Generates a Condition-satisfying closure that returns true if there are any entities with the given component type.
  • Instructs the executor to call System::apply_deferred on the systems that have run but not applied their Deferred system parameters (like Commands) or other system buffers.
  • If a new state is queued in NextState<S>, this system:
  • dbgDeprecated
    System adapter that utilizes the [bevy_utils::tracing::debug!] macro to print the output of a system.
  • A system for adding Despawned components to disconnected clients. This works by listening for removed Client components.
  • errorDeprecated
    System adapter that utilizes the [bevy_utils::tracing::error!] macro to print the output of a system.
  • ignoreDeprecated
    System adapter that ignores the output of the previous system in a pipe. This is useful for fallible systems that should simply return early in case of an Err/None.
  • Generates a Condition-satisfying closure that returns true if the state machine is currently in state.
  • infoDeprecated
    System adapter that utilizes the [bevy_utils::tracing::info!] macro to print system information.
  • Generates a Condition that inverses the result of passed one.
  • Generates a Condition-satisfying closure that returns true if there are any new events of the given type since it was last called.
  • Generates a Condition-satisfying closure that returns true if the resource of the given type has been added since the condition was last checked.
  • Generates a Condition-satisfying closure that returns true if the resource of the given type has had its value changed since the condition was last checked.
  • Generates a Condition-satisfying closure that returns true if the resource of the given type has had its value changed since the condition was last checked.
  • Generates a Condition-satisfying closure that returns true if the resource is equal to value.
  • Generates a Condition-satisfying closure that returns true if the resource exists.
  • Generates a Condition-satisfying closure that returns true if the resource of the given type has had its value changed since the condition was last checked.
  • Generates a Condition-satisfying closure that returns true if the resource exists and is equal to value.
  • Generates a Condition-satisfying closure that returns true if the resource of the given type has been removed since the condition was last checked.
  • Generates a Condition-satisfying closure that returns true if the first time the condition is run and false every time after
  • Generates a Condition-satisfying closure that returns true if the state machine changed state.
  • Generates a Condition-satisfying closure that returns true if the state machine exists.
  • Generates a Condition-satisfying closure that returns true if the state machine exists and is currently in state.
  • unwrapDeprecated
    System adapter that unwraps the Ok variant of a Result. This is useful for fallible systems that should panic in the case of an error.
  • warnDeprecated
    System adapter that utilizes the [bevy_utils::tracing::warn!] macro to print the output of a system.

Derive Macros