comparison src/th06/enemy.rs @ 709:6d4802abe134

Make interpolators use u32 instead of u16.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 08 Sep 2019 17:53:13 +0200
parents 81232dac8136
children c187e0a6b751
comparison
equal deleted inserted replaced
708:3954801b6299 709:6d4802abe134
398 let Position { mut x, mut y } = self.pos; 398 let Position { mut x, mut y } = self.pos;
399 399
400 let speed = if self.update_mode == 1 { 400 let speed = if self.update_mode == 1 {
401 let mut speed = 0.; 401 let mut speed = 0.;
402 if let Some(interpolator) = &self.interpolator { 402 if let Some(interpolator) = &self.interpolator {
403 let values = interpolator.values(self.frame as u16); 403 let values = interpolator.values(self.frame);
404 x = values[0]; 404 x = values[0];
405 y = values[1]; 405 y = values[1];
406 } 406 }
407 if let Some(interpolator) = &self.speed_interpolator { 407 if let Some(interpolator) = &self.speed_interpolator {
408 let values = interpolator.values(self.frame as u16); 408 let values = interpolator.values(self.frame);
409 speed = values[0]; 409 speed = values[0];
410 } 410 }
411 speed 411 speed
412 } else { 412 } else {
413 let speed = self.speed; 413 let speed = self.speed;