Mercurial > touhou
comparison pytouhou/vm/eclrunner.py @ 76:f305c0e406d6
Handle all move_to_* ECL instructions.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 30 Aug 2011 17:12:08 -0700 |
parents | b3bd421bb895 |
children | 6fa6d74a049a |
comparison
equal
deleted
inserted
replaced
75:b3bd421bb895 | 76:f305c0e406d6 |
---|---|
378 #TODO: unknown | 378 #TODO: unknown |
379 self._enemy.speed = speed | 379 self._enemy.speed = speed |
380 self._enemy.angle = self._enemy.get_player_angle(self._enemy.select_player(self._game_state.players)) | 380 self._enemy.angle = self._enemy.get_player_angle(self._enemy.select_player(self._game_state.players)) |
381 | 381 |
382 | 382 |
383 @instruction(56) | |
384 def move_to_linear(self, duration, x, y, z): | |
385 self._enemy.move_to(duration, x, y, z, lambda x: x) | |
386 | |
387 | |
383 @instruction(57) | 388 @instruction(57) |
384 def move_to(self, duration, x, y, z): | 389 def move_to_decel(self, duration, x, y, z): |
385 self._enemy.move_to(duration, x, y, z, lambda x: 2. * x - x ** 2) | 390 self._enemy.move_to(duration, x, y, z, lambda x: 2. * x - x ** 2) |
386 | 391 |
387 | 392 |
388 @instruction(59) | 393 @instruction(59) |
389 def move_to2(self, duration, x, y, z): | 394 def move_to_accel(self, duration, x, y, z): |
390 self._enemy.move_to(duration, x, y, z, lambda x: x ** 2) | 395 self._enemy.move_to(duration, x, y, z, lambda x: x ** 2) |
391 | 396 |
392 | 397 |
393 @instruction(61) | 398 @instruction(61) |
394 def stop_in(self, duration): | 399 def stop_in(self, duration): |