pub struct VfxManager {
pub decals: DecalPool,
pub trails: TrailManager,
pub impacts: Vec<ImpactEffect>,
pub shockwaves: Vec<Shockwave>,
pub flashes: Vec<ScreenFlash>,
pub command_queue: Vec<VfxCommand>,
/* private fields */
}Expand description
Central VFX coordinator.
Fields§
§decals: DecalPool§trails: TrailManager§impacts: Vec<ImpactEffect>§shockwaves: Vec<Shockwave>§flashes: Vec<ScreenFlash>§command_queue: Vec<VfxCommand>Implementations§
Source§impl VfxManager
impl VfxManager
pub fn new() -> Self
pub fn queue(&mut self, cmd: VfxCommand)
pub fn flush_commands(&mut self)
pub fn execute(&mut self, cmd: VfxCommand)
pub fn tick(&mut self, dt: f32)
Sourcepub fn screen_flash_color(&self) -> Vec4
pub fn screen_flash_color(&self) -> Vec4
Dominant screen flash color (additive blend of active flashes).
Source§impl VfxManager
impl VfxManager
Sourcepub fn bullet_impact(
&mut self,
pos: Vec3,
normal: Vec3,
material: BulletMaterial,
)
pub fn bullet_impact( &mut self, pos: Vec3, normal: Vec3, material: BulletMaterial, )
Spawn a bullet impact effect at world position.
Sourcepub fn magic_impact(&mut self, pos: Vec3, color: Vec4, radius: f32)
pub fn magic_impact(&mut self, pos: Vec3, color: Vec4, radius: f32)
Spawn a magic spell impact.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VfxManager
impl RefUnwindSafe for VfxManager
impl Send for VfxManager
impl Sync for VfxManager
impl Unpin for VfxManager
impl UnsafeUnpin for VfxManager
impl UnwindSafe for VfxManager
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<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>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> 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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.