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

Method update

src/shot.rs:21–29  ·  view source on GitHub ↗
(&mut self, delta: Duration)

Source from the content-addressed store, hash-verified

19 }
20 }
21 pub fn update(&mut self, delta: Duration) {
22 self.timer.tick(delta);
23 if self.timer.finished() && !self.exploding {
24 if self.y > 0 {
25 self.y -= 1;
26 }
27 self.timer.reset();
28 }
29 }
30 pub fn explode(&mut self) {
31 self.exploding = true;
32 self.timer = Timer::new(Duration::from_millis(250));

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected