本文整理汇总了Python中score.Score.returnNormalScore方法的典型用法代码示例。如果您正苦于以下问题:Python Score.returnNormalScore方法的具体用法?Python Score.returnNormalScore怎么用?Python Score.returnNormalScore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类score.Score
的用法示例。
在下文中一共展示了Score.returnNormalScore方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: PlayScreen
# 需要导入模块: from score import Score [as 别名]
# 或者: from score.Score import returnNormalScore [as 别名]
#.........这里部分代码省略.........
displayTimeString = displayTimeString[:-3]
# write time to screen
self.displayTime = self.largefont.render('Klukka: ' + displayTimeString, 1, (255,255,255))
screen.blit(self.displayTime, self.displayTimeRect)
# check if we are in 'game finished' mode
if self.displayLoseScreen or self.displayWinScreen:
'''
TODO: Highscore registration screen
'''
if isPressed:
if self.highscore.parseHighscores(self.score.getSumScore(self.gameResults)):
self.displayWinScreen = False
self.displayLoseScreen = False
self.displayRegister = True
else:
currentScreenIndex = STARTSCREEN
startover = True
color = (192, 57, 43)
if self.displayLoseScreen:
# if game was lost set color theme to red
color = (192, 57, 43)
self.gameResults = False
elif self.displayWinScreen:
# if game was won set color theme to green
color = (49, 182, 144)
self.gameResults = True
# create drawable objects for score and time. Score info is requested from model
timeLabel = self.smallfont.render(str(self.finalTime) , 1, color)
pointLabel = self.smallfont.render(str(self.score.returnNormalScore()), 1, color)
bonuspointLabel = self.smallfont.render(str(self.score.returnCombo()), 1, color)
timepointLabel = self.smallfont.render(str(self.score.getTimeScore(int(self.finalTime), self.gameResults)), 1, color)
totalpointLabel = self.largefont.render(str(self.score.getSumScore(self.gameResults)), 1, color)
# if lose screen draw lose screen
if self.displayLoseScreen:
screen.blit(self.endscreen[IMG], self.endscreen[RECT])
# if win screen draw win screen
elif self.displayWinScreen:
screen.blit(self.winscreen[IMG], self.winscreen[RECT])
# draw info to screen
screen.blit(timeLabel, timeLabel.get_rect().move(369,216))
screen.blit(pointLabel, pointLabel.get_rect().move(369,280))
screen.blit(bonuspointLabel, bonuspointLabel.get_rect().move(369,305))
screen.blit(timepointLabel, timepointLabel.get_rect().move(369,330))
screen.blit(totalpointLabel, totalpointLabel.get_rect().move(369,353))
# check if game is over
gameover = PlayScreen.gameOver(self, deck, pile, minidecks)
# if game is over and game status hasn't been checked
if gameover and self.checkGameStatus:
play.pauseSong()
self.displayLoseScreen = True # request lose screen
self.finalTime = displayTimeString # stop and save timer to variable
self.checkGameStatus = False # we only need to check game status once in each game
if self.sound == True:
play.gameOver()
# if all minidecks are empty and game status hasn't been checked