本文整理汇总了Python中core.Core.isQuit方法的典型用法代码示例。如果您正苦于以下问题:Python Core.isQuit方法的具体用法?Python Core.isQuit怎么用?Python Core.isQuit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core.Core
的用法示例。
在下文中一共展示了Core.isQuit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from core import Core [as 别名]
# 或者: from core.Core import isQuit [as 别名]
#.........这里部分代码省略.........
self.menu_twitter_button.fadeout( 6, 120 )
self.menu_music_button.fadeout( 6, 120 )
self.menu_chunk_button.fadeout( 6, 120 )
self.menu_author_log.fadeout( 6, 120 )
self.menu_game_log.fadeout( 6, 120 )
self.menu_settings_log.fadeout( 6, 120 )
self.menu_score_log.fadeout( 6, 120 )
self.menu_music.setVolume( 0.3 )
elif self.menu_exit_log.getState() == 2:
self.menu_background.fadeout( 6 )
self.menu_title.fadeout( 6 )
self.menu_play_button.fadeout( 6 )
self.menu_git_button.fadeout( 6 )
self.menu_google_button.fadeout( 6 )
self.menu_facebook_button.fadeout( 6 )
self.menu_twitter_button.fadeout( 6 )
self.menu_music_button.fadeout( 6 )
self.menu_chunk_button.fadeout( 6 )
self.menu_author_log.fadeout( 6 )
self.menu_game_log.fadeout( 6 )
self.menu_settings_log.fadeout( 6 )
self.menu_score_log.fadeout( 6 )
if self.menu_exit_log.getState() == 2 and self.menu_background.getAlpha() == 0:
self.core.setQuit()
#IF USER CLICK PLAY BUTTON
if self.menu_play_button.getState() == 1:
self.menu_background.fadeout( 6 )
self.menu_title.fadeout( 6 )
self.menu_play_button.fadeout( 6 )
self.menu_git_button.fadeout( 6 )
self.menu_google_button.fadeout( 6 )
self.menu_facebook_button.fadeout( 6 )
self.menu_twitter_button.fadeout( 6 )
self.menu_music_button.fadeout( 6 )
self.menu_chunk_button.fadeout( 6 )
self.menu_author_log.fadeout( 6 )
self.menu_game_log.fadeout( 6 )
self.menu_settings_log.fadeout( 6 )
self.menu_score_log.fadeout( 6 )
if self.menu_music.isPaused() == False:
self.menu_music.fadeOut()
if self.menu_play_button.getAlpha() == 0:
self.menu_play_button.setNext( 0 )
self.core.setState( 1 )
#-------------------------------------------------------------------------------------------------------STATE 1
if self.core.getState() == 1:
#FADE IN IF PAUSE BUTTON == OFF AND MENU_LOG == OFF
if self.menu_log.getState() == 0:
self.wall.fadein( 5 )
self.hero.fadein( 5 )
self.map.fadein( 5 )
elif self.menu_log.getState() == 1:
self.wall.fadeout( 6, 130 )
self.hero.fadeout( 6, 130 )
self.map.fadeout( 6, 130 )
elif self.menu_log.getState() == 2:
self.wall.fadeout( 6 )
self.hero.fadeout( 6 )
self.map.fadeout( 6 )
if self.wall.getAlpha() == 0:
self.menu_log.setState( 0 )
if self.menu_music.isPaused() == False:
self.menu_music.play()
self.core.setState( 0 ) #Back to menu
#DRAW
self.wall.draw( self.core.getWindow() )
self.hero.draw( self.core.getWindow() )
self.menu_log.draw( self.core.getWindow() )
self.map.draw( self.core.getWindow() )
def loop( self ):
while not self.core.isQuit():
self.handle()
self.core.fillDisplay()
self.states()
self.core.tickClock()
pygame.display.update()
def quit( self ):
pygame.quit()