def all_sprites(state):
    """
    Returns a list of sprites in the state
    """
    json_data = state.data.get('json')
    sprites = []
    if json_data != None:
        for child in json_data.get('children'):
            if 'spriteInfo' in child:
                sprites.append(child)
    return sprites
