本文整理汇总了Python中Menu.menuShop方法的典型用法代码示例。如果您正苦于以下问题:Python Menu.menuShop方法的具体用法?Python Menu.menuShop怎么用?Python Menu.menuShop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Menu
的用法示例。
在下文中一共展示了Menu.menuShop方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: action
# 需要导入模块: import Menu [as 别名]
# 或者: from Menu import menuShop [as 别名]
def action(self):
menuShop = Menu.menuShop("images/menu/menu_shop/background_menu_shop.jpg", self.player)
menuShop.addButton(Article.Article("images/menu/menu_shop/item1_gold_skin", 70, 160, self.player, 0, 10000, True))
menuShop.addButton(Article.Article("images/menu/menu_shop/item2_basic_weapon_lvl2", 70, 300, self.player, 1, 1000))
menuShop.addButton(Article.Article("images/menu/menu_shop/item3_xtreme_weapon_lvl1", 70, 440, self.player, 2, 2000))
menuShop.addButton(Article.Article("images/menu/menu_shop/item4_xtreme_weapon_lvl2", 70, 580, self.player, 3, 5000))
menuShop.addButton(Article.Article("images/menu/menu_shop/item5_booster", 70, 720, self.player, 4, 500))
menuShop.addButton(Article.Article("images/menu/menu_shop/item6_spoiler", 70, 860, self.player, 5, 750))
menuShop.addButton(Article.ArticleMissile("images/menu/menu_shop/item7_missile", 70, 1000, self.player, 6, self.player.prixMissile))
menuShop.afficher()
示例2: action
# 需要导入模块: import Menu [as 别名]
# 或者: from Menu import menuShop [as 别名]
def action(self):
if self.player.shopStateList[self.positionShopStateList] == 0:
if self.player.money - self.price >= 0:
self.player.updateShopStateList(self.positionShopStateList, 1)
self.player.money -= self.price
if (self.positionShopStateList < 6) and (self.player.shopStateList[self.positionShopStateList + 1]==-1):
self.player.updateShopStateList(self.positionShopStateList+1 ,0)
menuShop = Menu.menuShop("images/menu/menu_shop/background_menu_shop.jpg", self.player)
menuShop.addButton(Article("images/menu/menu_shop/item1_gold_skin", 70, 160, self.player, 0, 10000, True))
menuShop.addButton(Article("images/menu/menu_shop/item2_basic_weapon_lvl2", 70, 300, self.player, 1, 1000))
menuShop.addButton(Article("images/menu/menu_shop/item3_xtreme_weapon_lvl1", 70, 440, self.player, 2, 2000))
menuShop.addButton(Article("images/menu/menu_shop/item4_xtreme_weapon_lvl2", 70, 580, self.player, 3, 5000))
menuShop.addButton(Article("images/menu/menu_shop/item5_booster", 70, 720, self.player, 4, 500))
menuShop.addButton(Article("images/menu/menu_shop/item6_spoiler", 70, 860, self.player, 5, 750))
menuShop.addButton(ArticleMissile("images/menu/menu_shop/item7_missile", 70, 1000, self.player, 6, self.player.prixMissile))
menuShop.afficher()