本文整理汇总了Python中Settings.Settings.menuonq方法的典型用法代码示例。如果您正苦于以下问题:Python Settings.menuonq方法的具体用法?Python Settings.menuonq怎么用?Python Settings.menuonq使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Settings.Settings
的用法示例。
在下文中一共展示了Settings.menuonq方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Settings
# 需要导入模块: from Settings import Settings [as 别名]
# 或者: from Settings.Settings import menuonq [as 别名]
pypyp = platform.python_implementation() == "PyPy"
# load settings
savefolderpath = os.path.join(pathtoself, "save0/")
manualsavebackuppath = os.path.join(pathtoself, "savebackup/");
settingspath = os.path.join(savefolderpath, "bdsettings.txt")
savepath = os.path.join(savefolderpath, "bdsave.txt")
settings = Settings()
if not dontloadsettings:
if (os.path.isfile(os.path.abspath(settingspath))):
if os.path.getsize(os.path.abspath(settingspath)) > 0:
with open(settingspath, "rb") as f:
settings = pickle.load(f)
settings.menuonq = True
# load games
def loadpolar():
from polarinvaders.polarinvaders import creategame
return creategame()
# go from being a function that loads a game to being a game object
games = {"polarinvaders":loadpolar}
def currentgame():
return games[settings.currentgame]