Struct bevy_rrise::emitter_listener::RrEmitter
source · pub struct RrEmitter {
pub event_id: AkID<'static>,
pub flags: AkCallbackType,
pub auto_post: bool,
pub despawn_on_silent: bool,
/* private fields */
}Expand description
Sound emitter configuration.
If its entity gets destroyed or this component gets removed, the events posted with it will be stopped.
Fields
event_id: AkID<'static>The event to pre-set on this emitter.
Defaults to no event (ie, "").
See auto_post
flags: AkCallbackTypeMask describing which callbacks you want to subscribe to.
Defaults to none (ie, AkCallbackType(0)).
auto_post: boolWhether to auto post the associated event when this emitter gets registered.
See event_id
despawn_on_silent: boolWhether to automatically despawn the entity bearing this emitter when it is done playing.
Remark “Done playing” = no more events are playing on it - work if several events got posted simultaneously with it.
Implementations
sourceimpl RrEmitter
impl RrEmitter
sourcepub fn is_playing(&self) -> bool
pub fn is_playing(&self) -> bool
Whether any events are playing on this emitter
sourcepub fn is_registered(&self) -> bool
pub fn is_registered(&self) -> bool
Whether this component appears to be registered in Wwise.
You can make sure of this by also querying for the RrRegistered component on your entities.
sourcepub fn post_associated_event(
&mut self,
cb_channel: Option<CallbackChannel>
) -> AkPlayingID
pub fn post_associated_event(
&mut self,
cb_channel: Option<CallbackChannel>
) -> AkPlayingID
Posts the event self.event_id using flags self.flags.
If you pass None for cb_channel, you won’t receive any AkCallbackEvent
in your [EventReader]s, even if you had some flags set in self.flags.
See CallbackChannel
sourcepub fn post_event<'b, T: Into<AkID<'b>>>(
&mut self,
event: T,
flags: AkCallbackType,
cb_channel: Option<CallbackChannel>
) -> AkPlayingID
pub fn post_event<'b, T: Into<AkID<'b>>>(
&mut self,
event: T,
flags: AkCallbackType,
cb_channel: Option<CallbackChannel>
) -> AkPlayingID
Posts event using flags (this method ignores self.flags).
If you pass None for cb_channel, you won’t receive any AkCallbackEvent
in your [EventReader]s, even if you had some flags.
See CallbackChannel
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RrEmitter
impl Send for RrEmitter
impl Sync for RrEmitter
impl Unpin for RrEmitter
impl UnwindSafe for RrEmitter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids(
components: &mut Components,
storages: &mut Storages,
ids: &mut impl FnMut(ComponentId)
)
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> Cwhere
F: for<'a> FnMut(&'a mut T) -> OwningPtr<'a>,
fn get_components(self, func: &mut impl FnMut(OwningPtr<'_>))
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read morefn 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. Read morefn 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. Read moreimpl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Self using data from the given [World]