Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bs
- import bsTeamGame
- # how BombSquad knows we exist
- def getGames():
- return [HelloWorldGame]
- class HelloWorldGame(bsTeamGame.TeamGameActivity):
- @classmethod
- def getName(c):
- return 'Hello World Game'
- @classmethod
- def getDescription(c,sessionType):
- return 'Just a test game.'
- def onBegin(self):
- bsTeamGame.TeamGameActivity.onBegin(self)
- # game's starting - let's just set a timer to end it in 5 seconds
- bs.screenMessage("Hello World! Ending in 5 seconds...")
- self._endTimer = bs.Timer(5000,bs.WeakCall(self._endGame))
- def _endGame(self):
- # game's over - set a score for each team and tell the game to end
- results = bsTeamGame.Results()
- for t in self.teams.values(): results.setTeamScore(t,0)
- self.end(results=results)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement