Exemple #1
0
 def update(self, dt):
     for updater in self.updaters:
         num_args = get_num_args(updater)
         if num_args == 1:
             updater(self)
         elif num_args == 2:
             updater(self, dt)
         else:
             raise Exception("Mobject updater expected 1 or 2 "
                             "arguments, %d given" % num_args)
Exemple #2
0
 def get_time_based_updaters(self):
     return [
         updater for updater in self.updaters if get_num_args(updater) == 2
     ]