Trait amethyst_renderer::WithSpriteRender [−][src]
pub trait WithSpriteRender where
Self: Sized, { fn with_sprite(
self,
sprite: &Sprite,
texture: TextureHandle,
texture_size: (f32, f32)
) -> Result<Self>; }
An easy way to attach and display a sprite when building an entity
Required Methods
fn with_sprite(
self,
sprite: &Sprite,
texture: TextureHandle,
texture_size: (f32, f32)
) -> Result<Self>
self,
sprite: &Sprite,
texture: TextureHandle,
texture_size: (f32, f32)
) -> Result<Self>
Adds a mesh and a material to the entity being built corresponding to the sprite and texture given.
Implementations on Foreign Types
impl<'a> WithSpriteRender for EntityBuilder<'a>[src]
impl<'a> WithSpriteRender for EntityBuilder<'a>fn with_sprite(
self,
sprite: &Sprite,
texture: TextureHandle,
texture_size: (f32, f32)
) -> Result<Self>[src]
fn with_sprite(
self,
sprite: &Sprite,
texture: TextureHandle,
texture_size: (f32, f32)
) -> Result<Self>