

def schedule(self, callback, *args, **kwargs):
    '\n        Schedule a function to be called every frame.\n\n        The function should have a prototype that includes ``dt`` as the\n        first argument, which gives the elapsed time, in seconds, since the\n        last clock tick.  Any additional arguments given to this function\n        are passed on to the callback::\n\n            def callback(dt, *args, **kwargs):\n                pass\n\n        This function is a wrapper to ``pyglet.clock.schedule``.\n        It has the additional benefit that all calllbacks are paused and\n        resumed when the node leaves or enters a scene.\n\n        You should not have to schedule things using pyglet by yourself.\n\n        Arguments:\n            callback (a function):\n                The function to call each frame.\n            *args: Variable length argument list passed to the ``callback``.\n            **kwargs: Arbitrary keyword arguments  passed to the ``callback``.\n        '
    if self.is_running:
        pyglet.clock.schedule(callback, *args, **kwargs)
    kwargs.scheduled_calls.append((callback, args, kwargs))

dataset/ETHPy150Open los-cocos/cocos/cocos/cocosnode.py CocosNode.schedule/VarMisuse@43/361 `self`->`kwargs`