diff 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
line wrap: on
line diff
--- a/src/th06/enemy.rs
+++ b/src/th06/enemy.rs
@@ -400,12 +400,12 @@ impl Enemy {
         let speed = if self.update_mode == 1 {
             let mut speed = 0.;
             if let Some(interpolator) = &self.interpolator {
-                let values = interpolator.values(self.frame as u16);
+                let values = interpolator.values(self.frame);
                 x = values[0];
                 y = values[1];
             }
             if let Some(interpolator) = &self.speed_interpolator {
-                let values = interpolator.values(self.frame as u16);
+                let values = interpolator.values(self.frame);
                 speed = values[0];
             }
             speed