示例#1
0
    def __init__(self, dragon, dragonDatabase, x=-1, y=-1):
        Dragon.__init__(self, dragon, dragonDatabase)
        self.x = x
        self.y = y
        self.speed = gameData.enemySpeed #walking
        self.speed2 = gameData.enemySpeed2 #flying
        self.exit = False
        self.loc = 0 #index of data checkpoints
        self.img = pygame.transform.flip(self.img, True, False)
        
        self.setLevel()
        self.hp = self.setHP()
        self.maxHP = self.hp
        self.isFrozen = False
        self.isFrozenCount = 0

        frozenImage = pygame.image.load("img/f%s.png" % self.dragon)
        self.frozenImg = pygame.transform.scale(frozenImage, (40,40))
        self.frozenImg = pygame.transform.flip(self.frozenImg, True, False)


        self.isPoison = False
        self.isPoisonCount = 0

        poisonImage = pygame.image.load("img/p%s.png" % self.dragon)
        self.poisonImg = pygame.transform.scale(poisonImage, (40,40))
        self.poisonImg = pygame.transform.flip(self.poisonImg, True, False)

        frozenPoisonImage = pygame.image.load("img/fp%s.png" % self.dragon)
        self.frozenPoisonImg = pygame.transform.scale(frozenPoisonImage, (40,40))
        self.frozenPoisonImg = pygame.transform.flip(self.frozenPoisonImg, True, False)
示例#2
0
 def __init__(self, dragon, dragonDatabase, level=1, x=None, y=None):
     Dragon.__init__(self, dragon, dragonDatabase)
     self.x = x
     self.y = y
     self.range = dragonDatabase[dragon][5]
     self.counter = self.maxCounter
     self.target = None
     self.onBoard = False
     self.size = 20
     self.bullets = []
     self.radius = False
     self.attack = self.baseAttack
     self.cost = 250