pub struct ActionEvents(/* private fields */);input_bei and (crate features input_bei or input_native or leafwing) only.Expand description
Bitset with events caused by state transitions of TriggerState.
During EnhancedInputSystems::Apply, events that correspond to bitflags will be triggered.
You can use this component directly in systems or react on corresponding events in observers.
Table of state transitions:
The meaning of each kind depends on the assigned InputConditions. The events are
triggered in the action evaluation order.
Implementations§
Source§impl ActionEvents
impl ActionEvents
pub const STARTED: ActionEvents = Self::START
Replaced by START
pub const FIRED: ActionEvents = Self::FIRE
Replaced by FIRE
pub const CANCELLED: ActionEvents = Self::CANCEL
Replaced by CANCEL
pub const COMPLETED: ActionEvents = Self::COMPLETE
Replaced by COMPLETE
Source§impl ActionEvents
impl ActionEvents
Sourcepub const START: ActionEvents
pub const START: ActionEvents
Corresponds to Start.
Sourcepub const ONGOING: ActionEvents
pub const ONGOING: ActionEvents
Corresponds to Ongoing.
Sourcepub const FIRE: ActionEvents
pub const FIRE: ActionEvents
Corresponds to Fire.
Sourcepub const CANCEL: ActionEvents
pub const CANCEL: ActionEvents
Corresponds to Cancel.
Sourcepub const COMPLETE: ActionEvents
pub const COMPLETE: ActionEvents
Corresponds to Complete.
Source§impl ActionEvents
impl ActionEvents
Sourcepub const fn empty() -> ActionEvents
pub const fn empty() -> ActionEvents
Get a flags value with all bits unset.
Sourcepub const fn all() -> ActionEvents
pub const fn all() -> ActionEvents
Get a flags value with all known bits set.
Sourcepub const fn bits(&self) -> u8
pub const fn bits(&self) -> u8
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u8) -> Option<ActionEvents>
pub const fn from_bits(bits: u8) -> Option<ActionEvents>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u8) -> ActionEvents
pub const fn from_bits_truncate(bits: u8) -> ActionEvents
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u8) -> ActionEvents
pub const fn from_bits_retain(bits: u8) -> ActionEvents
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<ActionEvents>
pub fn from_name(name: &str) -> Option<ActionEvents>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: ActionEvents) -> bool
pub const fn intersects(&self, other: ActionEvents) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: ActionEvents) -> bool
pub const fn contains(&self, other: ActionEvents) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn insert(&mut self, other: ActionEvents)
pub fn insert(&mut self, other: ActionEvents)
The bitwise or (|) of the bits in two flags values.
Sourcepub fn remove(&mut self, other: ActionEvents)
pub fn remove(&mut self, other: ActionEvents)
The intersection of a source flags value with the complement of a target flags
value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: ActionEvents)
pub fn toggle(&mut self, other: ActionEvents)
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub fn set(&mut self, other: ActionEvents, value: bool)
pub fn set(&mut self, other: ActionEvents, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: ActionEvents) -> ActionEvents
pub const fn intersection(self, other: ActionEvents) -> ActionEvents
The bitwise and (&) of the bits in two flags values.
Sourcepub const fn union(self, other: ActionEvents) -> ActionEvents
pub const fn union(self, other: ActionEvents) -> ActionEvents
The bitwise or (|) of the bits in two flags values.
Sourcepub const fn difference(self, other: ActionEvents) -> ActionEvents
pub const fn difference(self, other: ActionEvents) -> ActionEvents
The intersection of a source flags value with the complement of a target flags
value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(self, other: ActionEvents) -> ActionEvents
pub const fn symmetric_difference(self, other: ActionEvents) -> ActionEvents
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub const fn complement(self) -> ActionEvents
pub const fn complement(self) -> ActionEvents
The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§impl ActionEvents
impl ActionEvents
Sourcepub const fn iter(&self) -> Iter<ActionEvents>
pub const fn iter(&self) -> Iter<ActionEvents>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<ActionEvents>
pub const fn iter_names(&self) -> IterNames<ActionEvents>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Source§impl ActionEvents
impl ActionEvents
Sourcepub fn new(previous: TriggerState, current: TriggerState) -> ActionEvents
pub fn new(previous: TriggerState, current: TriggerState) -> ActionEvents
Creates a new instance based on state transition.
Trait Implementations§
Source§impl Binary for ActionEvents
impl Binary for ActionEvents
Source§impl BitAnd for ActionEvents
impl BitAnd for ActionEvents
Source§fn bitand(self, other: ActionEvents) -> ActionEvents
fn bitand(self, other: ActionEvents) -> ActionEvents
The bitwise and (&) of the bits in two flags values.
Source§type Output = ActionEvents
type Output = ActionEvents
& operator.Source§impl BitAndAssign for ActionEvents
impl BitAndAssign for ActionEvents
Source§fn bitand_assign(&mut self, other: ActionEvents)
fn bitand_assign(&mut self, other: ActionEvents)
The bitwise and (&) of the bits in two flags values.
Source§impl BitOr for ActionEvents
impl BitOr for ActionEvents
Source§fn bitor(self, other: ActionEvents) -> ActionEvents
fn bitor(self, other: ActionEvents) -> ActionEvents
The bitwise or (|) of the bits in two flags values.
Source§type Output = ActionEvents
type Output = ActionEvents
| operator.Source§impl BitOrAssign for ActionEvents
impl BitOrAssign for ActionEvents
Source§fn bitor_assign(&mut self, other: ActionEvents)
fn bitor_assign(&mut self, other: ActionEvents)
The bitwise or (|) of the bits in two flags values.
Source§impl BitXor for ActionEvents
impl BitXor for ActionEvents
Source§fn bitxor(self, other: ActionEvents) -> ActionEvents
fn bitxor(self, other: ActionEvents) -> ActionEvents
The bitwise exclusive-or (^) of the bits in two flags values.
Source§type Output = ActionEvents
type Output = ActionEvents
^ operator.Source§impl BitXorAssign for ActionEvents
impl BitXorAssign for ActionEvents
Source§fn bitxor_assign(&mut self, other: ActionEvents)
fn bitxor_assign(&mut self, other: ActionEvents)
The bitwise exclusive-or (^) of the bits in two flags values.
Source§impl Clone for ActionEvents
impl Clone for ActionEvents
Source§fn clone(&self) -> ActionEvents
fn clone(&self) -> ActionEvents
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Component for ActionEvents
impl Component for ActionEvents
Source§const STORAGE_TYPE: StorageType = ::bevy::ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = ::bevy::ecs::component::StorageType::Table
Source§type Mutability = Mutable
type Mutability = Mutable
Component<Mutability = Mutable>,
while immutable components will instead have Component<Mutability = Immutable>. Read moreSource§fn register_required_components(
_requiree: ComponentId,
required_components: &mut RequiredComponentsRegistrator<'_, '_>,
)
fn register_required_components( _requiree: ComponentId, required_components: &mut RequiredComponentsRegistrator<'_, '_>, )
Source§fn clone_behavior() -> ComponentCloneBehavior
fn clone_behavior() -> ComponentCloneBehavior
Source§fn relationship_accessor() -> Option<ComponentRelationshipAccessor<ActionEvents>>
fn relationship_accessor() -> Option<ComponentRelationshipAccessor<ActionEvents>>
ComponentRelationshipAccessor required for working with relationships in dynamic contexts. Read moreSource§fn on_add() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_add() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_insert() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_insert() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_replace() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_replace() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_remove() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_remove() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
EntityMapper. This is used to remap entities in contexts like scenes and entity cloning.
When deriving Component, this is populated by annotating fields containing entities with #[entities] Read moreimpl Copy for ActionEvents
Source§impl Debug for ActionEvents
impl Debug for ActionEvents
Source§impl Default for ActionEvents
impl Default for ActionEvents
Source§fn default() -> ActionEvents
fn default() -> ActionEvents
Source§impl<'de> Deserialize<'de> for ActionEvents
impl<'de> Deserialize<'de> for ActionEvents
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActionEvents, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActionEvents, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ActionEvents
Source§impl Extend<ActionEvents> for ActionEvents
impl Extend<ActionEvents> for ActionEvents
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ActionEvents>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ActionEvents>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for ActionEvents
impl Flags for ActionEvents
Source§const FLAGS: &'static [Flag<ActionEvents>]
const FLAGS: &'static [Flag<ActionEvents>]
Source§fn from_bits_retain(bits: u8) -> ActionEvents
fn from_bits_retain(bits: u8) -> ActionEvents
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Source§fn iter_defined_names() -> IterDefinedNames<Self>
fn iter_defined_names() -> IterDefinedNames<Self>
Self::FLAGS.Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in two flags values.Source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!). Read moreSource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in two flags values.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in two flags values.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!). Read moreSource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in two flags values.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in a flags value, truncating the result.Source§impl FromIterator<ActionEvents> for ActionEvents
impl FromIterator<ActionEvents> for ActionEvents
Source§fn from_iter<T>(iterator: T) -> ActionEventswhere
T: IntoIterator<Item = ActionEvents>,
fn from_iter<T>(iterator: T) -> ActionEventswhere
T: IntoIterator<Item = ActionEvents>,
The bitwise or (|) of the bits in each flags value.
Source§impl IntoIterator for ActionEvents
impl IntoIterator for ActionEvents
Source§type Item = ActionEvents
type Item = ActionEvents
Source§type IntoIter = Iter<ActionEvents>
type IntoIter = Iter<ActionEvents>
Source§fn into_iter(self) -> <ActionEvents as IntoIterator>::IntoIter
fn into_iter(self) -> <ActionEvents as IntoIterator>::IntoIter
Source§impl LowerHex for ActionEvents
impl LowerHex for ActionEvents
Source§impl Not for ActionEvents
impl Not for ActionEvents
Source§fn not(self) -> ActionEvents
fn not(self) -> ActionEvents
The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§type Output = ActionEvents
type Output = ActionEvents
! operator.Source§impl Octal for ActionEvents
impl Octal for ActionEvents
Source§impl PartialEq for ActionEvents
impl PartialEq for ActionEvents
Source§fn eq(&self, other: &ActionEvents) -> bool
fn eq(&self, other: &ActionEvents) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ActionEvents
impl Serialize for ActionEvents
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ActionEvents
Source§impl Sub for ActionEvents
impl Sub for ActionEvents
Source§fn sub(self, other: ActionEvents) -> ActionEvents
fn sub(self, other: ActionEvents) -> ActionEvents
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§type Output = ActionEvents
type Output = ActionEvents
- operator.Source§impl SubAssign for ActionEvents
impl SubAssign for ActionEvents
Source§fn sub_assign(&mut self, other: ActionEvents)
fn sub_assign(&mut self, other: ActionEvents)
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Auto Trait Implementations§
impl Freeze for ActionEvents
impl RefUnwindSafe for ActionEvents
impl Send for ActionEvents
impl Sync for ActionEvents
impl Unpin for ActionEvents
impl UnsafeUnpin for ActionEvents
impl UnwindSafe for ActionEvents
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut ComponentsRegistrator<'_>, ) -> impl Iterator<Item = ComponentId> + use<C>
Source§fn get_component_ids(
components: &Components,
) -> impl Iterator<Item = Option<ComponentId>>
fn get_component_ids( components: &Components, ) -> impl Iterator<Item = Option<ComponentId>>
Source§impl<C> BundleFromComponents for Cwhere
C: Component,
impl<C> BundleFromComponents for Cwhere
C: Component,
impl<T, U> Captures<U> for Twhere
T: ?Sized,
impl<T> Channel for T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
Source§unsafe fn get_components(
ptr: MovingPtr<'_, C>,
func: &mut impl FnMut(StorageType, OwningPtr<'_>),
) -> <C as DynamicBundle>::Effect
unsafe fn get_components( ptr: MovingPtr<'_, C>, func: &mut impl FnMut(StorageType, OwningPtr<'_>), ) -> <C as DynamicBundle>::Effect
Source§unsafe fn apply_effect(
_ptr: MovingPtr<'_, MaybeUninit<C>>,
_entity: &mut EntityWorldMut<'_>,
)
unsafe fn apply_effect( _ptr: MovingPtr<'_, MaybeUninit<C>>, _entity: &mut EntityWorldMut<'_>, )
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more