Exemplo n.º 1
0
def launchNewGame(titleScreen):
    print('launchNewGame')
    newGame = game.game(images, screen, clock, iFace, FX, iH, titleScreen, SFX,
                        myWorldBall, loadHero=C.mainLoop(screen))
    FX.fadeOut(0)
    iFace.state = 'game'
    if newGame.mainLoop():
        endScreen(newGame, "You Win!")
    else:
        endScreen(newGame, "Game Over.")
    FX.fadeOut(0)
Exemplo n.º 2
0
def launchNewGame(titleScreen):
    print('launchNewGame')
    newGame = game.game(images,
                        screen,
                        clock,
                        iFace,
                        FX,
                        iH,
                        titleScreen,
                        SFX,
                        myWorldBall,
                        loadHero=C.mainLoop(screen))
    FX.fadeOut(0)
    iFace.state = 'game'
    if newGame.mainLoop():
        endScreen(newGame, "You Win!")
    else:
        endScreen(newGame, "Game Over.")
    FX.fadeOut(0)
Exemplo n.º 3
0
def loadSavedGame(titleScreen):
    if android:
        android.hide_keyboard()
    try:
        FX.displayLoadingMessage(titleScreen, 'Loading game file...')
        savFile = gzip.GzipFile('ransack0.sav', 'rb', 1)
        FX.displayLoadingMessage(titleScreen, 'Loading saved game...')
        ball = cPickle.load(savFile)
        savFile.close()
        Game = game.game(images, screen, clock, iFace, FX, iH, titleScreen,
                         SFX, myWorldBall, ball[0], ball[1], ball[2], ball[3])
        FX.fadeOut(0)
        iFace.state = 'game'
        if Game.mainLoop():
            endScreen(Game, "You Win!")
        else:
            endScreen(Game, "Game Over.")
        FX.fadeOut(0)
    except IOError as err:
        print('loadSavedGame error: {}'.format(err))
Exemplo n.º 4
0
def loadSavedGame(titleScreen):
    if android:
        android.hide_keyboard()
    try:
        FX.displayLoadingMessage(titleScreen, 'Loading game file...')
        savFile = gzip.GzipFile('ransack0.sav', 'rb', 1)
        FX.displayLoadingMessage(titleScreen, 'Loading saved game...')
        ball = cPickle.load(savFile)
        savFile.close()
        Game = game.game(images, screen, clock, iFace,
                         FX, iH, titleScreen, SFX, myWorldBall,
                         ball[0], ball[1], ball[2], ball[3])
        FX.fadeOut(0)
        iFace.state = 'game'
        if Game.mainLoop():
            endScreen(Game, "You Win!")
        else:
            endScreen(Game, "Game Over.")
        FX.fadeOut(0)
    except IOError as err:
        print ('loadSavedGame error: {}'.format(err))