Enum rusty_engine::sprite::SpritePreset
source · pub enum SpritePreset {
Show 20 variants
RacingBarrelBlue,
RacingBarrelRed,
RacingBarrierRed,
RacingBarrierWhite,
RacingCarBlack,
RacingCarBlue,
RacingCarGreen,
RacingCarRed,
RacingCarYellow,
RacingConeStraight,
RollingBallBlue,
RollingBallBlueAlt,
RollingBallRed,
RollingBallRedAlt,
RollingBlockCorner,
RollingBlockNarrow,
RollingBlockSmall,
RollingBlockSquare,
RollingHoleEnd,
RollingHoleStart,
}
Expand description
Sprite presets using the asset pack all have colliders
Variants§
RacingBarrelBlue
RacingBarrelRed
RacingBarrierRed
RacingBarrierWhite
RacingCarBlack
RacingCarBlue
RacingCarGreen
RacingCarRed
RacingCarYellow
RacingConeStraight
RollingBallBlue
RollingBallBlueAlt
RollingBallRed
RollingBallRedAlt
RollingBlockCorner
RollingBlockNarrow
RollingBlockSmall
RollingBlockSquare
RollingHoleEnd
RollingHoleStart
Implementations§
source§impl SpritePreset
impl SpritePreset
sourcepub fn filepath(&self) -> PathBuf
pub fn filepath(&self) -> PathBuf
Retrieve the asset filepath. You probably won’t need to call this method, since the methods
which create Sprite
s will accept SpritePreset
s and call this method via the
impl From<SpritePreset> for PathBuf
implementation.
sourcepub fn variant_iter() -> IntoIter<SpritePreset, 20>
pub fn variant_iter() -> IntoIter<SpritePreset, 20>
An iterator that iterates through presets. Mostly useful for things like level builders when you want to be able to rotate something through each preset.
sourcepub fn next(&self) -> SpritePreset
pub fn next(&self) -> SpritePreset
Just get the next sprite preset in the list, without dealing with an iterator
sourcepub fn prev(&self) -> SpritePreset
pub fn prev(&self) -> SpritePreset
Just get the previous sprite preset in the list, without dealing with an iterator
Trait Implementations§
source§impl Clone for SpritePreset
impl Clone for SpritePreset
source§fn clone(&self) -> SpritePreset
fn clone(&self) -> SpritePreset
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SpritePreset
impl Debug for SpritePreset
source§impl From<SpritePreset> for PathBuf
impl From<SpritePreset> for PathBuf
source§fn from(sprite_preset: SpritePreset) -> Self
fn from(sprite_preset: SpritePreset) -> Self
Converts to this type from the input type.
source§impl PartialEq for SpritePreset
impl PartialEq for SpritePreset
source§fn eq(&self, other: &SpritePreset) -> bool
fn eq(&self, other: &SpritePreset) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SpritePreset
impl Eq for SpritePreset
impl StructuralEq for SpritePreset
impl StructuralPartialEq for SpritePreset
Auto Trait Implementations§
impl RefUnwindSafe for SpritePreset
impl Send for SpritePreset
impl Sync for SpritePreset
impl Unpin for SpritePreset
impl UnwindSafe for SpritePreset
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
Return the
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist.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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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
.§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
.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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
Compare self to
key
and return true
if they are equal.