Method
advance
(&mut self, delta_ms: u64)
Source from the content-addressed store, hash-verified
| 163 | } |
| 164 | |
| 165 | pub fn advance(&mut self, delta_ms: u64) -> bool { |
| 166 | if !self.active || delta_ms == 0 { |
| 167 | return false; |
| 168 | } |
| 169 | |
| 170 | self.tick_accumulator_ms = self.tick_accumulator_ms.saturating_add(delta_ms); |
| 171 | let mut changed = false; |
| 172 | while self.tick_accumulator_ms >= self.frame_interval_ms { |
| 173 | changed |= self.tick(); |
| 174 | self.tick_accumulator_ms -= self.frame_interval_ms; |
| 175 | } |
| 176 | changed |
| 177 | } |
| 178 | |
| 179 | pub fn render( |
| 180 | &self, |
Tested by
no test coverage detected