当前位置: 首页>>代码示例>>Python>>正文


Python Menu.singlelist方法代码示例

本文整理汇总了Python中menu.Menu.singlelist方法的典型用法代码示例。如果您正苦于以下问题:Python Menu.singlelist方法的具体用法?Python Menu.singlelist怎么用?Python Menu.singlelist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在menu.Menu的用法示例。


在下文中一共展示了Menu.singlelist方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: selectgender

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import singlelist [as 别名]
 def selectgender(self, screen):
     """Allows the player to select a gender for their character."""
     bg = pygame.image.load(self.display.BG_FULL).convert()
     screen.blit(bg, (0, 0))
     menu = Menu()
     gender = ["Female", "Male"]
     self.chardata["Gender"] = menu.singlelist(gender, 2, 2,screen)
开发者ID:jmuckian,项目名称:GodsAndMonsters,代码行数:9,代码来源:char.py

示例2: selectmoralcode

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import singlelist [as 别名]
 def selectmoralcode(self, screen):
     """Checks ability scores and allows player to select from
     available archetype based on primary ability.
     
     --Page 14--
     
     """
     bg = pygame.image.load(self.display.BG_FULL).convert()
     screen.blit(bg, (0, 0))
     menu = Menu()
     self.chardata["Moral Code"] = menu.singlelist(self.gamedata.MORAL_CODES,
                                                   2, 2, screen)
开发者ID:jmuckian,项目名称:GodsAndMonsters,代码行数:14,代码来源:char.py

示例3: selectspecies

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import singlelist [as 别名]
 def selectspecies(self, screen):
     """Allows the player to select a species for their character.
     This deviates somewhat from the rule set, as this would be
     selected as a 'specialty'.  As it is here, this will 'cost' the
     player their specialty, thus only humans will get to select a
     specialty to begin with.
     
     """
     bg = pygame.image.load(self.display.BG_FULL).convert()
     screen.blit(bg, (0, 0))
     menu = Menu()
     self.chardata["Species"] = menu.singlelist(self.gamedata.SPECIES_NAMES,
                                                2, 2, screen)
开发者ID:jmuckian,项目名称:GodsAndMonsters,代码行数:15,代码来源:char.py

示例4: selectarchetype

# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import singlelist [as 别名]
 def selectarchetype(self, screen):
     """Checks ability scores and allows player to select from
     available archetype based on primary ability.
     
     --Page 14--
     
     """
     bg = pygame.image.load(self.display.BG_FULL).convert()
     screen.blit(bg, (0, 0))
     choices = []
     # Checks character ability scores against archetype prime
     # ability and appends to the available list if prime is 9 or
     # greater for that archetype
     for archetype in self.gamedata.ARCH:
         prime = self.gamedata.ARCH_ATTRIBUTES[archetype][0]
         if self.chardata[prime][0] > 8:
             choices.append(archetype)
     menu = Menu()
     self.chardata["Archetype"] = menu.singlelist(choices, 2, 2, screen)
     if self.chardata["Archetype"] == "Thief":
         self.chardata["Thief Skill Points"] = 12
开发者ID:jmuckian,项目名称:GodsAndMonsters,代码行数:23,代码来源:char.py


注:本文中的menu.Menu.singlelist方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。