Exemple #1
0
 def __init__(self):
     bs.Session.__init__(self)
     self._locked = False
     # we have a splash screen only on ali currently..
     env = bs.getEnvironment()
     global gFirstRun
     if env['platform'] == 'android' \
        and env['subplatform'] == 'alibaba' \
        and gFirstRun:
         bsInternal._lockAllInput()
         self._locked = True
         self.setActivity(bs.newActivity(SplashScreenActivity))
         gFirstRun = False
     else:
         self.setActivity(bs.newActivity(MainMenuActivity))
Exemple #2
0
    def __init__(self, *args, **kwargs):
        self._useTeams = False
        self._tutorialActivityInstance = None
        bs.Session.__init__(self, teamNames=None,
                            teamColors=None,
                            useTeamColors=False,
                            minPlayers=1,
                            maxPlayers=self.getMaxPlayers())

        self._haveShownControlsHelpOverlay = False

        self._seriesLength = 1
        self._ffaSeriesLength = 1

        # which game activity we're on
        self._gameNumber = 0
        self._playlist = SimplePlaylist(self._config, self._gameType)
        config["selected"] = self._gameType.__name__
        config["config"] = self._config
        bs.writeConfig()

        # get a game on deck ready to go
        self._currentGameSpec = None
        self._nextGameSpec = self._playlist.pullNext()
        self._nextGame = self._nextGameSpec["resolvedType"]

        # go ahead and instantiate the next game we'll use so it has lots of time to load
        self._instantiateNextGame()

        # start in our custom join screen
        self.setActivity(bs.newActivity(bsTeamGame.TeamJoiningActivity))
	def __init__(self, *args, **kwargs):
		self._useTeams = False
		self._tutorialActivityInstance = None
		bs.Session.__init__(self, teamNames=None,
		                    teamColors=None,
		                    useTeamColors=False,
		                    minPlayers=1,
		                    maxPlayers=self.getMaxPlayers())

		self._haveShownControlsHelpOverlay = False

		self._seriesLength = 1
		self._ffaSeriesLength = 1

		# which game activity we're on
		self._gameNumber = 0
		self._playlist = SimplePlaylist(self._config, self._gameType)
		config["selected"] = self._gameType.__name__
		config["config"] = self._config
		bs.writeConfig()


		# get a game on deck ready to go
		self._currentGameSpec = None
		self._nextGameSpec = self._playlist.pullNext()
		self._nextGame = self._nextGameSpec["resolvedType"]

		# go ahead and instantiate the next game we'll use so it has lots of time to load
		self._instantiateNextGame()

		# start in our custom join screen
		self.setActivity(bs.newActivity(bsTeamGame.TeamJoiningActivity))
Exemple #4
0
 def onActivityEnd(self, activity, results):
     if self._locked:
         bsInternal._unlockAllInput()
     # any ending activity leads us into the main menu one..
     self.setActivity(bs.newActivity(MainMenuActivity))