MCPcopy Create free account
hub / github.com/CleanCut/invaders / update

Method update

src/player.rs:41–46  ·  view source on GitHub ↗
(&mut self, delta: Duration)

Source from the content-addressed store, hash-verified

39 }
40 }
41 pub fn update(&mut self, delta: Duration) {
42 for shot in self.shots.iter_mut() {
43 shot.update(delta);
44 }
45 self.shots.retain(|shot| !shot.dead());
46 }
47 pub fn detect_hits(&mut self, invaders: &mut Invaders) -> u16 {
48 let mut hit_something = 0u16;
49 for shot in self.shots.iter_mut() {

Callers

nothing calls this directly

Calls 1

deadMethod · 0.80

Tested by

no test coverage detected