Struct ParticleProviderRegistry
pub struct ParticleProviderRegistry { /* private fields */ }Expand description
The game’s ParticleProviders: the registrations by name.
Implementations§
§impl ParticleProviderRegistry
impl ParticleProviderRegistry
pub fn into_providers(self) -> BTreeMap<String, Arc<dyn ParticleProvider>>
pub fn into_providers(self) -> BTreeMap<String, Arc<dyn ParticleProvider>>
Each type’s provider, the last registration for a name winning.
Trait Implementations§
§impl Default for ParticleProviderRegistry
impl Default for ParticleProviderRegistry
§fn default() -> ParticleProviderRegistry
fn default() -> ParticleProviderRegistry
Returns the “default value” for a type. Read more
§impl ParticleProviders for ParticleProviderRegistry
impl ParticleProviders for ParticleProviderRegistry
§fn register(&mut self, name: String, provider: Arc<dyn ParticleProvider>)
fn register(&mut self, name: String, provider: Arc<dyn ParticleProvider>)
registerSpriteSet(type, provider): provider moves every particle of the type name
(mymod:spark), whose sprite set is assets/mymod/particles/spark.json. A later
registration for a name replaces the earlier one. A name no sprite set matches is logged
and its particles draw nothing, as any named type without its sprite set does.Auto Trait Implementations§
impl !RefUnwindSafe for ParticleProviderRegistry
impl !UnwindSafe for ParticleProviderRegistry
impl Freeze for ParticleProviderRegistry
impl Send for ParticleProviderRegistry
impl Sync for ParticleProviderRegistry
impl Unpin for ParticleProviderRegistry
impl UnsafeUnpin for ParticleProviderRegistry
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