本文整理汇总了Python中World.cleanupCompletely方法的典型用法代码示例。如果您正苦于以下问题:Python World.cleanupCompletely方法的具体用法?Python World.cleanupCompletely怎么用?Python World.cleanupCompletely使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类World
的用法示例。
在下文中一共展示了World.cleanupCompletely方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: enter_entry
# 需要导入模块: import World [as 别名]
# 或者: from World import cleanupCompletely [as 别名]
def enter_entry(self):
if not Globals.PLAYER is None:
Globals.PLAYER.kill(False)
Globals.PLAYER = None
World.cleanupCompletely()
Globals.CURRENT_LEVEL = "one"
Globals.initSunTracker(True)
Globals.PLAYER_MAX_HEALTH = 15
SKILL_MAX_HEALTH = 0
PLAYER_REGEN_TIME = 7
PLAYER_DAMAGE = 5
SKILL_DAMAGE = 0
PLAYER_MAX_MP = 10
PLAYER_SKILL = 0
PLAYER_JUMP = 610.0
SKILL_JUMP = 0
ARROW_VELOCITY = 700.0
ARROW_HITS = 1
ARROW_DAMAGE = 2
BOW_COOLDOWN = 0.7
MAX_SKILL = 9
MINI_SUNS = 0
LEVELS_BEAT = 0
SCORE = 0
TIME = 120
Globals.STATE = ControlScreen.ControlScreen()
示例2: exitGame
# 需要导入模块: import World [as 别名]
# 或者: from World import cleanupCompletely [as 别名]
def exitGame(self):
ImageManager.unloadSet("debug")
AudioManager.unloadSfxSet("debug")
World.cleanupCompletely()
Globals.PLAYER = None
pygame.mixer.music.fadeout(1000)
if Globals.CURRENT_LEVEL == "one":
Globals.CURRENT_LEVEL = "two"
if Globals.LEVELS_BEAT < 1:
Globals.LEVELS_BEAT = 1
elif Globals.CURRENT_LEVEL == "two":
Globals.CURRENT_LEVEL = "three"
if Globals.LEVELS_BEAT < 2:
Globals.LEVELS_BEAT = 2
elif Globals.CURRENT_LEVEL == "three":
Globals.CURRENT_LEVEL = "four"
if Globals.LEVELS_BEAT < 3:
Globals.LEVELS_BEAT = 3
elif Globals.CURRENT_LEVEL == "four":
Globals.CURRENT_LEVEL = "five"
if Globals.LEVELS_BEAT < 4:
Globals.LEVELS_BEAT = 4
Globals.MINI_SUNS_INLVL = 0
Globals.STATE = WinScreen.WinScreen()
Globals.CHECKPOINT_SET = False
示例3: exitFinal
# 需要导入模块: import World [as 别名]
# 或者: from World import cleanupCompletely [as 别名]
def exitFinal(self):
ImageManager.unloadSet("debug")
AudioManager.unloadSfxSet("debug")
World.cleanupCompletely()
AudioManager.loadMusic("title")
pygame.mixer.music.play(-1)
if Globals.LEVELS_BEAT < 5:
Globals.LEVELS_BEAT = 5
Globals.SCORE = Globals.SCORE + 5000*Globals.MINI_SUNS
Globals.PLAYER = None
Globals.STATE = CompletedGameScreen.CompletedGameScreen()
Globals.CHECKPOINT_SET = False
示例4: update
# 需要导入模块: import World [as 别名]
# 或者: from World import cleanupCompletely [as 别名]
def update(self, time):
if InputManager.getPressed("up"):
self.selectionID -= 1
if self.selectionID < 0:
self.selectionID = (Globals.LEVELS_BEAT + 1)
elif InputManager.getPressed("down"):
self.selectionID =\
(self.selectionID + 1) % (Globals.LEVELS_BEAT + 2)
if InputManager.getPressed("enter"):
if self.selectionID == 0:
World.cleanupCompletely()
Globals.PLAYER = None
Globals.STATE = EntryScreen.EntryScreen()
Globals.CURRENT_LEVEL = "one"
elif self.selectionID == 1 and Globals.LEVELS_BEAT > 0:
World.cleanupCompletely()
Globals.PLAYER = None
Globals.STATE = EnterMountainScreen.EnterMountainScreen()
Globals.CURRENT_LEVEL = "two"
elif self.selectionID == 2 and Globals.LEVELS_BEAT > 1:
World.cleanupCompletely()
Globals.PLAYER = None
Globals.STATE = EnterCaveScreen.EnterCaveScreen()
Globals.CURRENT_LEVEL = "three"
elif self.selectionID == 3 and Globals.LEVELS_BEAT > 2:
World.cleanupCompletely()
Globals.PLAYER = None
Globals.STATE = EnterSnowScreen.EnterSnowScreen()
Globals.CURRENT_LEVEL = "four"
elif self.selectionID == 4 and Globals.LEVELS_BEAT > 3:
World.cleanupCompletely()
Globals.PLAYER = None
Globals.STATE = EnterFinalScreen.EnterFinalScreen()
Globals.CURRENT_LEVEL = "five"
elif self.selectionID == (Globals.LEVELS_BEAT + 1):
self.enter_back()
if InputManager.getPressed("esc"):
self.enter_back()
self.time += time
if self.time < MapScreen.FADEINTIME:
ratio = self.time / MapScreen.FADEINTIME
value = int(ratio * 255)
halfValue = int(ratio * 127)
self.color = pygame.color.Color(value, value, value)
self.selectedColor =\
pygame.color.Color(halfValue, value, halfValue)
示例5: deadScreen
# 需要导入模块: import World [as 别名]
# 或者: from World import cleanupCompletely [as 别名]
def deadScreen(self):
ImageManager.unloadSet("debug")
AudioManager.unloadSfxSet("debug")
World.cleanupCompletely()
Globals.PLAYER = None
pygame.mixer.music.stop()
if Globals.MINI_SUNS_INLVL > 0:
Globals.MINI_SUNS = Globals.MINI_SUNS - 1
Globals.SCORE = Globals.SCORE - 1000*Globals.MINI_SUNS_INLVL
if Globals.CURRENT_LEVEL != "five":
pickCount = random.randint(1, 10)
index = 0
if Globals.MINI_SUNS_INLVL > 0: # remove sun code
while pickCount > 0:
index = (index + 1) % 5
if Globals.sunTr()[index]:
continue
pickCount -= 1
Globals.SUN_TRACKER[Globals.CURRENT_LEVEL][index] = True
# Globals.SUN_TRACKER[Globals.CURRENT_LEVEL] = self.sunArray
Globals.STATE = OverScreen.OverScreen()
Globals.MINI_SUNS_INLVL = 0