Lines Matching refs:sprite_id

92             for sprite_id in self.dead_sprites.iter() {  in prune_dead_sprites()
93 let n = self.running_for_child(*sprite_id) in prune_dead_sprites()
97 to_remove.insert(*sprite_id); in prune_dead_sprites()
101 for sprite_id in to_remove.iter() { in prune_dead_sprites()
102 self.remove_child(*sprite_id); in prune_dead_sprites()
122 pub fn run(&mut self, sprite_id: Uuid, animation: &Behavior<Animation>) { in run()
124 let animations = match self.running.entry(sprite_id) { in run()
132 fn find(&self, sprite_id: Uuid, animation: &Behavior<Animation>) -> Option<usize> { in find()
134 if let Some(animations) = self.running.get(&sprite_id) { in find()
146 pub fn pause(&mut self, sprite_id: Uuid, animation: &Behavior<Animation>) { in pause()
147 if let Some(index) = self.find(sprite_id, animation) { in pause()
148 let animations = self.running.get_mut(&sprite_id).unwrap(); in pause()
155 pub fn resume(&mut self, sprite_id: Uuid, animation: &Behavior<Animation>) { in resume()
156 if let Some(index) = self.find(sprite_id, animation) { in resume()
157 let animations = self.running.get_mut(&sprite_id).unwrap(); in resume()
164 pub fn toggle(&mut self, sprite_id: Uuid, animation: &Behavior<Animation>) { in toggle()
165 if let Some(index) = self.find(sprite_id, animation) { in toggle()
166 let animations = self.running.get_mut(&sprite_id).unwrap(); in toggle()
173 pub fn stop(&mut self, sprite_id: Uuid, animation: &Behavior<Animation>) { in stop()
174 if let Some(index) = self.find(sprite_id, animation) { in stop()
175 self.running.get_mut(&sprite_id).unwrap().remove(index); in stop()
180 pub fn stop_all(&mut self, sprite_id: Uuid) { in stop_all()
181 self.running.remove(&sprite_id); in stop_all()
195 pub fn running_for_child(&self, sprite_id: Uuid) -> Option<usize> { in running_for_child()
196 if let Some(animations) = self.running.get(&sprite_id) { in running_for_child()
199 if self.child(sprite_id).is_some() { in running_for_child()