def _doFadeAndQuit(self):
		# FIXME: using protected apis
		bsInternal._fadeScreen(False, time=200, endCall=bs.Call(bs.quit, soft=True))
		bsInternal._lockAllInput()
		# unlock and fade back in shortly.. just in case something goes wrong
		# (or on android where quit just backs out of our activity and we may come back)
		bs.realTimer(300, bsInternal._unlockAllInput)
예제 #2
0
def startGame(session, fadeout=True):
    def callback():
        if fadeout:
            bsInternal._unlockAllInput()
        try:
            bsInternal._newHostSession(session)
        except Exception:
            import bsMainMenu
            bs.printException("exception running session", session)
            # drop back into a main menu session..
            bsInternal._newHostSession(bsMainMenu.MainMenuSession)

    if fadeout:
        bsInternal._fadeScreen(False, time=250, endCall=callback)
        bsInternal._lockAllInput()
    else:
        callback()
def startGame(session, fadeout=True):
	def callback():
		if fadeout:
			bsInternal._unlockAllInput()
		try:
			bsInternal._newHostSession(session)
		except Exception:
			import bsMainMenu
			bs.printException("exception running session", session)
			# drop back into a main menu session..
			bsInternal._newHostSession(bsMainMenu.MainMenuSession)

	if fadeout:
		bsInternal._fadeScreen(False, time=250, endCall=callback)
		bsInternal._lockAllInput()
	else:
		callback()