コード例 #1
0
ファイル: main.py プロジェクト: daniel-wen/bouncier
 def drawWin(self, screen):
     space = 24
     screen.blit(self.pauseMenu.background,
         (self.pauseMenu.x - self.margin, self.pauseMenu.y - self.margin))
     drawText(screen, self.pauseMenu.x, self.pauseMenu.y,
         text="Congratulations!", font=self.font.text, anchor="nw")
     drawText(screen, self.pauseMenu.x, self.pauseMenu.y + space,
         text="Press Enter...", font=self.font.text, anchor="nw")
コード例 #2
0
ファイル: main.py プロジェクト: daniel-wen/bouncier
 def drawMenu(self, screen):
     titleTop = 70
     titleLeft = 60
     x = drawText(screen, titleLeft, titleTop,
         text="Bouncy Bouncy ", font=self.font.title, anchor="nw")
     space = 8
     drawText(screen, x + space, titleTop, text="Revamped",
         font=self.font.titleEmph, anchor="nw")
     self.mainMenu.draw(screen, self.font.text)
コード例 #3
0
ファイル: main.py プロジェクト: daniel-wen/bouncier
 def drawGame(self, screen):
     self.terrain.draw(screen)
     self.ball.draw(screen)
     pos = 30
     drawText(screen, self.margin, pos,
         text="Level %s" % self.level, font=self.font.text, anchor="nw")
     pos = 80
     drawText(screen, self.margin, pos,
         text="Score: %d" % self.score, font=self.font.text, anchor="nw")
     pos = 110
     drawText(screen, self.margin, pos, text="Highscore:",
         font=self.font.text, anchor="nw")
     pos = 130
     drawText(screen, self.margin, pos, text=self.highscoreText,
         font=self.font.text, anchor="nw")
     self.drawGameTime(screen)
コード例 #4
0
ファイル: main.py プロジェクト: daniel-wen/bouncier
 def drawGameTime(self, screen):
     pos = 180
     drawText(screen, self.margin, pos,
         text=str(self.stopwatch), font=self.font.text, anchor="nw")
     pos = 210
     drawText(screen, self.margin, pos, text="Best time:",
         font=self.font.text, anchor="nw")
     pos = 230
     drawText(screen, self.margin, pos, text=self.bestTimeText,
         font=self.font.text, anchor="nw")
コード例 #5
0
ファイル: main.py プロジェクト: daniel-wen/bouncier
 def drawHelp(self, screen):
     top = 50
     left = 40
     drawText(screen, left, top,
         text="Instructions", font=self.font.text, anchor="nw")
     top = 80
     lineHeight = 24
     for line, text in enumerate(self.helpText):
         drawText(screen, left, top + line*lineHeight,
             text=text, font=self.font.text, anchor="nw")
     top = 350
     drawText(screen, left, top, text="Press Escape now for the main menu",
         font=self.font.text, anchor="nw")
コード例 #6
0
ファイル: main.py プロジェクト: daniel-wen/bouncier
 def drawLevelMenu(self, screen):
     titleTop = 60
     titleLeft = 30
     drawText(screen, titleLeft, titleTop,
         text="Level select", font=self.font.text, anchor="nw")
     self.levelMenu.draw(screen, self.font.text)