

def do(self, action, target=None):
    "Executes an :class:`.Action`.\n        When the action is finished, it will be removed from the node's actions\n        container.\n        \n        To remove an action you must use the :meth:`do` return value to\n        call :meth:`remove_action`.\n\n        Arguments:\n            action (Action): \n                Action that will be executed.\n        Returns:\n            Action: A clone of ``action``\n\n        "
    a = copy.deepcopy(action)
    if (target is None):
        a.target = self
    else:
        a.target = target
    a.start()
    self.actions.append(a)
    if (not self.scheduled):
        if self.is_running:
            self.scheduled = True
            pyglet.clock.schedule(self._step)
    return a

dataset/ETHPy150Open los-cocos/cocos/cocos/cocosnode.py CocosNode.do/original