Mercurial > touhou
comparison pytouhou/vm/eclrunner.py @ 489:59bd29568753
Remove identity lambda for interpolators, improves performances slightly.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 04 Oct 2013 11:19:04 +0200 |
parents | 06f0eeb519bb |
children | 6be9c99a3a24 |
comparison
equal
deleted
inserted
replaced
488:791faab05445 | 489:59bd29568753 |
---|---|
503 | 503 |
504 @instruction(56) | 504 @instruction(56) |
505 def move_to_linear(self, duration, x, y, z): | 505 def move_to_linear(self, duration, x, y, z): |
506 self._enemy.move_to(duration, | 506 self._enemy.move_to(duration, |
507 self._getval(x), self._getval(y), self._getval(z), | 507 self._getval(x), self._getval(y), self._getval(z), |
508 lambda x: x) | 508 None) |
509 | 509 |
510 | 510 |
511 @instruction(57) | 511 @instruction(57) |
512 def move_to_decel(self, duration, x, y, z): | 512 def move_to_decel(self, duration, x, y, z): |
513 self._enemy.move_to(duration, | 513 self._enemy.move_to(duration, |
522 lambda x: x ** 2) | 522 lambda x: x ** 2) |
523 | 523 |
524 | 524 |
525 @instruction(61) | 525 @instruction(61) |
526 def stop_in(self, duration): | 526 def stop_in(self, duration): |
527 self._enemy.stop_in(duration, lambda x: x) | 527 self._enemy.stop_in(duration, None) |
528 | 528 |
529 | 529 |
530 @instruction(63) | 530 @instruction(63) |
531 def stop_in_accel(self, duration): | 531 def stop_in_accel(self, duration): |
532 self._enemy.stop_in(duration, lambda x: 1. - x) | 532 self._enemy.stop_in(duration, lambda x: 1. - x) |