コード例 #1
0
ファイル: gui.py プロジェクト: Waterseas/pyorpg-client
    def loadSprites(self):
        spritesAmount = countFiles(g.dataPath + '/items/')

        for i in range(spritesAmount):
            tempImage = pygame.image.load(g.dataPath + '/items/' + str(i) + '.png').convert_alpha()
            self.itemSprites.append(tempImage)

        spritesAmount = countFiles(g.dataPath + '/spells/')

        for i in range(spritesAmount):
            tempImage = pygame.image.load(g.dataPath + '/spells/' + str(i) + '.bmp').convert()
            self.spellSprites.append(tempImage)
コード例 #2
0
ファイル: gui.py プロジェクト: wty0512/pyorpg-client
    def loadSprites(self):
        spritesAmount = countFiles(g.dataPath + '/items/')

        for i in range(spritesAmount):
            tempImage = pygame.image.load(g.dataPath + '/items/' + str(i) + '.png').convert_alpha()
            self.itemSprites.append(tempImage)

        spritesAmount = countFiles(g.dataPath + '/spells/')

        for i in range(spritesAmount):
            tempImage = pygame.image.load(g.dataPath + '/spells/' + str(i) + '.bmp').convert()
            self.spellSprites.append(tempImage)
コード例 #3
0
ファイル: graphics.py プロジェクト: Irtorius/pyorpg-client
    def loadSprites(self):
        # count how many sprites there are
        spriteAmount = countFiles(g.dataPath + '/sprites/')

        # load them all
        for i in range(0, spriteAmount):
            tempImage = pygame.image.load(g.dataPath + "/sprites/" + str(i) + ".bmp").convert()
            tempImage.set_colorkey((0, 0, 0))
            self.sprites.append(tempImage)

         # count how many sprites there are
        itemAmount = countFiles(g.dataPath + '/items/')

        # load them all
        for i in range(0, itemAmount):
            tempImage = pygame.image.load(g.dataPath + "/items/" + str(i) + ".png").convert_alpha()
            self.itemSprites.append(tempImage)
コード例 #4
0
    def loadSprites(self):
        # count how many sprites there are
        spriteAmount = countFiles(g.dataPath + '/sprites/')

        # load them all
        for i in range(0, spriteAmount):
            tempImage = pygame.image.load(g.dataPath + "/sprites/" + str(i) +
                                          ".bmp").convert()
            tempImage.set_colorkey((0, 0, 0))
            self.sprites.append(tempImage)

        # count how many sprites there are
        itemAmount = countFiles(g.dataPath + '/items/')

        # load them all
        for i in range(0, itemAmount):
            tempImage = pygame.image.load(g.dataPath + "/items/" + str(i) +
                                          ".png").convert_alpha()
            self.itemSprites.append(tempImage)