#1
|
|||
|
|||
passing data to viz.director
is there a way to pass information to vis.director(func)? I have an array of people i want to blink, and this is my setup, but i don't see it working:
Code:
class Person(viz.VizAvatar, viz.EventClass): ... def _blink(self): self._head.morph(0,1.0,0.1) viz.waittime(BLINK_DURATION) self._head.morph(0,0.0,0.1) viz.starttimer(TIMER_BLINK, random.uniform(BLINK_DELAY_MIN, BLINK_DELAY_MAX)) def _ontimer(self, num): if num == TIMER_BLINK: viz.director(self._blink) EDIT: my reason for the director function is because i need the waittime. otherwise the blink happens too fast and looks unnatural. |
|
|