diff pytouhou/game/eclrunner.py @ 62:1f591adcea04

Fix animation determination (ins_98 stuff) and some interpolation functions
author Thibaut Girka <thib@sitedethib.com>
date Wed, 24 Aug 2011 21:16:14 +0200
parents 4fe37a620b22
children 8527fe640844
line wrap: on
line diff
--- a/pytouhou/game/eclrunner.py
+++ b/pytouhou/game/eclrunner.py
@@ -334,7 +334,13 @@ class ECLRunner(object):
 
     @instruction(57)
     def move_to(self, duration, x, y, z):
-        self._enemy.move_to(duration, x, y, z)
+        self._enemy.move_to(duration, x, y, z, lambda x: 2. * x - x ** 2)
+
+
+    @instruction(59)
+    def move_to2(self, duration, x, y, z):
+        #TODO: not accurate
+        self._enemy.move_to(duration, x, y, z, lambda x: 1.0014 * x ** 2 - 0.0012 * x)
 
 
     @instruction(61)