comparison pytouhou/utils/interpolator.py @ 20:6ebf9539c077

Handle more enemies types and movements
author Thibaut Girka <thib@sitedethib.com>
date Thu, 11 Aug 2011 12:13:48 +0200
parents 58bc264aba38
children 811cefefb5c8
comparison
equal deleted inserted replaced
19:ca7886296d4a 20:6ebf9539c077
32 self.start_frame = frame 32 self.start_frame = frame
33 else: 33 else:
34 truc = float(frame - self.start_frame) / float(self.end_frame - self.start_frame) 34 truc = float(frame - self.start_frame) / float(self.end_frame - self.start_frame)
35 self.values = tuple(start_value + truc * (end_value - start_value) 35 self.values = tuple(start_value + truc * (end_value - start_value)
36 for (start_value, end_value) in zip(self.start_values, self.end_values)) 36 for (start_value, end_value) in zip(self.start_values, self.end_values))
37