Struct amethyst_animation::AnimationSet [−][src]
pub struct AnimationSet<I, T> where
I: Eq + Hash,
T: AnimationSampling, { pub animations: FnvHashMap<I, Handle<Animation<T>>>, }
Attaches to an entity that have animations, with links to all animations that can be run on the entity. Is not used directly by the animation systems, provided for convenience.
Type parameters:
T
: the component type that the animation should be applied to
Fields
animations: FnvHashMap<I, Handle<Animation<T>>>
Methods
impl<I, T> AnimationSet<I, T> where
I: Eq + Hash,
T: AnimationSampling,
[src]
impl<I, T> AnimationSet<I, T> where
I: Eq + Hash,
T: AnimationSampling,
pub fn new() -> Self
[src]
pub fn new() -> Self
Create
pub fn insert(&mut self, id: I, handle: Handle<Animation<T>>)
[src]
pub fn insert(&mut self, id: I, handle: Handle<Animation<T>>)
Insert an animation in the set
pub fn get(&self, id: &I) -> Option<&Handle<Animation<T>>>
[src]
pub fn get(&self, id: &I) -> Option<&Handle<Animation<T>>>
Retrieve an animation handle from the set
Trait Implementations
impl<I, T> Default for AnimationSet<I, T> where
I: Eq + Hash,
T: AnimationSampling,
[src]
impl<I, T> Default for AnimationSet<I, T> where
I: Eq + Hash,
T: AnimationSampling,
impl<I, T> Component for AnimationSet<I, T> where
I: Eq + Hash + Send + Sync + 'static,
T: AnimationSampling,
[src]
impl<I, T> Component for AnimationSet<I, T> where
I: Eq + Hash + Send + Sync + 'static,
T: AnimationSampling,
type Storage = DenseVecStorage<Self>
Associated storage type for this component.
Auto Trait Implementations
impl<I, T> Send for AnimationSet<I, T> where
I: Send,
<T as AnimationSampling>::Channel: Send,
<T as AnimationSampling>::Primitive: Send,
impl<I, T> Send for AnimationSet<I, T> where
I: Send,
<T as AnimationSampling>::Channel: Send,
<T as AnimationSampling>::Primitive: Send,
impl<I, T> Sync for AnimationSet<I, T> where
I: Sync,
<T as AnimationSampling>::Channel: Sync,
<T as AnimationSampling>::Primitive: Sync,
impl<I, T> Sync for AnimationSet<I, T> where
I: Sync,
<T as AnimationSampling>::Channel: Sync,
<T as AnimationSampling>::Primitive: Sync,