• Thank you for suggesting Action.call. This is exactly what I needed. I had overlooked this in the documentation.

    In the end, I created a sub class of the SpriteNode and modified the run_action method to add an action.call at the beginning and end of the action sequence. So every card that gets animated adds it’s name to stack of actions that are currently animating.

  • Many of the Pythonista-specific modules are written in C (or Objective-C) and compiled, so you can't see the source code for them. To find out if that's the case, import and look at the module in the Python console:

    >>> import console >>> console <module 'console' (built-in)>

    The "built-in" part means that the module is compiled and not written in Python.

    Some modules (like scene) are actually made of two modules: the main module is written in Python, and it imports a second module that is compiled. For example, you can see the location of the scene module's Python code:

    >>> import scene >>> scene <module 'scene' from '/var/containers/Bundle/Application/.../Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/scene.py'>

    However if you look into the scene.py file, you can see that it imports a _scene2 module, which is compiled:

    >>> import _scene2 >>> scene2 <module '_scene2' (built-in)>

    That means you can read the parts of the scene module that are written in Python (scene), but not those that are compiled (_scene2).

  • https://github.com/elff1493/pyscene, still a wip

  • You basically have to implement a physics system with a gravity component.

    Here is a simple example. Change the initial velocity to change angle of arc.

Internal error.

Oops! Looks like something went wrong!