Пример #1
0
    def __generateCard(self):
        self.notify.debug("__generateCard: %s" % self.typeId)
        # A card has already been generated, but we are
        # moving on to a new card at this point. We must
        # delete the reference to the old card before generating
        # a reference to the new card.
        if self.card.getGame():
            self.card.removeGame()

        # Generate the new game and update the card gui.
        game = self.__cardChoice()
        game.setGameState(self.initGameState)
        self.card.addGame(game)
        self.card.generateCard(self.tileSeed, self.pond.getArea())
        color = BingoGlobals.getColor(self.typeId)
        self.card.setProp('image_color',
                          VBase4(color[0], color[1], color[2], color[3]))
        color = BingoGlobals.getButtonColor(self.typeId)
        self.card.bingo.setProp('image_color',
                                VBase4(color[0], color[1], color[2], color[3]))

        if self.hasEntered:
            self.card.loadCard()
            self.card.show()
        else:
            self.card.hide()
 def __generateCard(self):
     self.notify.debug('__generateCard: %s' % self.typeId)
     if self.card.getGame():
         self.card.removeGame()
     game = self.__cardChoice()
     game.setGameState(self.initGameState)
     self.card.addGame(game)
     self.card.generateCard(self.tileSeed, self.pond.getArea())
     color = BingoGlobals.getColor(self.typeId)
     self.card.setProp('image_color', VBase4(color[0], color[1], color[2], color[3]))
     color = BingoGlobals.getButtonColor(self.typeId)
     self.card.bingo.setProp('image_color', VBase4(color[0], color[1], color[2], color[3]))
     if self.hasEntered:
         self.card.loadCard()
         self.card.show()
     else:
         self.card.hide()
Пример #3
0
 def __generateCard(self):
     self.notify.debug('__generateCard: %s' % self.typeId)
     if self.card.getGame():
         self.card.removeGame()
     game = self.__cardChoice()
     game.setGameState(self.initGameState)
     self.card.addGame(game)
     self.card.generateCard(self.tileSeed, self.pond.getArea())
     color = BingoGlobals.getColor(self.typeId)
     self.card.setProp('image_color', VBase4(color[0], color[1], color[2], color[3]))
     color = BingoGlobals.getButtonColor(self.typeId)
     self.card.bingo.setProp('image_color', VBase4(color[0], color[1], color[2], color[3]))
     if self.hasEntered:
         self.card.loadCard()
         self.card.show()
     else:
         self.card.hide()