pub struct InputSequenceBuilder<Act, S, I> {
pub system: S,
pub acts: Vec<Act>,
pub time_limit: Option<TimeLimit>,
/* private fields */
}
Expand description
An input sequence builder.
Fields§
§system: S
The action when to run when sequence matches
acts: Vec<Act>
Sequence of acts that trigger input sequence
time_limit: Option<TimeLimit>
Optional time limit after first match
Implementations§
Source§impl<Act> InputSequenceBuilder<Act, (), ()>
impl<Act> InputSequenceBuilder<Act, (), ()>
Sourcepub fn new<C, I, M>(system: C) -> InputSequenceBuilder<Act, C::System, I>
pub fn new<C, I, M>(system: C) -> InputSequenceBuilder<Act, C::System, I>
Create new input sequence. Not operant until added to an entity.
Source§impl<Act, S, I> InputSequenceBuilder<Act, S, I>
impl<Act, S, I> InputSequenceBuilder<Act, S, I>
Sourcepub fn time_limit(self, time_limit: impl Into<TimeLimit>) -> Self
pub fn time_limit(self, time_limit: impl Into<TimeLimit>) -> Self
Specify a time limit from the start of the first matching input.
Sourcepub fn build(self, world: &mut World) -> InputSequence<Act, S::In>
pub fn build(self, world: &mut World) -> InputSequence<Act, S::In>
Build the InputSequence. Requires world to register the system.
Trait Implementations§
Source§impl<Act, S, I> Command for InputSequenceBuilder<Act, S, I>
impl<Act, S, I> Command for InputSequenceBuilder<Act, S, I>
Source§impl<Act, S, I> EntityCommand for InputSequenceBuilder<Act, S, I>
impl<Act, S, I> EntityCommand for InputSequenceBuilder<Act, S, I>
Source§fn apply(self, entity_world: EntityWorldMut<'_>)
fn apply(self, entity_world: EntityWorldMut<'_>)
Executes this command for the given
Entity
.Auto Trait Implementations§
impl<Act, S, I> Freeze for InputSequenceBuilder<Act, S, I>where
S: Freeze,
impl<Act, S, I> RefUnwindSafe for InputSequenceBuilder<Act, S, I>
impl<Act, S, I> Send for InputSequenceBuilder<Act, S, I>
impl<Act, S, I> Sync for InputSequenceBuilder<Act, S, I>
impl<Act, S, I> Unpin for InputSequenceBuilder<Act, S, I>
impl<Act, S, I> UnwindSafe for InputSequenceBuilder<Act, S, I>
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<C> CommandWithEntity<Result<(), EntityMutableFetchError>> for Cwhere
C: EntityCommand,
impl<C> CommandWithEntity<Result<(), EntityMutableFetchError>> for Cwhere
C: EntityCommand,
Source§fn with_entity(
self,
entity: Entity,
) -> impl Command<Result<(), EntityMutableFetchError>> + HandleError<Result<(), EntityMutableFetchError>>
fn with_entity( self, entity: Entity, ) -> impl Command<Result<(), EntityMutableFetchError>> + HandleError<Result<(), EntityMutableFetchError>>
Passes in a specific entity to an
EntityCommand
, resulting in a Command
that
internally runs the EntityCommand
on that entity.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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&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> HandleError for Cwhere
C: Command,
impl<C> HandleError for Cwhere
C: Command,
Source§fn handle_error_with(
self,
_error_handler: fn(BevyError, ErrorContext),
) -> impl Command
fn handle_error_with( self, _error_handler: fn(BevyError, ErrorContext), ) -> impl Command
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>
Converts
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>
Converts
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