Ejemplo n.º 1
0
 def tick(self, time):
     self.current_time += time
     fraction = self.current_time / self.total_time # part of animation done
     if fraction > 1:
         fraction = 1
     current_rotation = Quaternion.new_interpolate(self.start_rotation,
                                                   self.dest_rotation,
                                                   fraction)
     self.object.rotation = current_rotation
     return fraction != 1 # continue animation iff it is not completed