def main():
    director.init(resizable=True, fullscreen=False)
    main_scene = cocos.scene.Scene()

    main_scene.add(BackgroundLayer(), z=0)

    # In real code after a sequence of grid actions the StopGrid() action
    # should be called. Omited here to stay in the last grid action render
    action1 = ac.ShuffleTiles(grid=(16, 8), seed=2, duration=3)

    main_scene.do(action1)
    director.run(main_scene)
def main():
    director.init(resizable=True, fullscreen=False)
    main_scene = cocos.scene.Scene()

    main_scene.add(BackgroundLayer(), z=0)

    action1 = ac.ShuffleTiles(grid=(16, 8), seed=2, duration=3) + ac.StopGrid()
    action2 = (ac.Delay(0.5) + ac.CallFunc(toggle_fullscreen) + ac.Delay(2.0) +
               ac.CallFunc(toggle_fullscreen))
    combo_action = action1 | action2

    # In real code after a sequence of grid actions the StopGrid() action
    # should be called. Omited here to stay in the last grid action render
    main_scene.do(combo_action)
    director.run(main_scene)