Example #1
0
    def __init__(self):
        self.group_players = pygame.sprite.Group()     #Lista con los jugadores
        self.group_missil = pygame.sprite.Group()      #Lista con todos los misiles
        self.group_enemy = pygame.sprite.Group()        #Lista con todos los enemigos
        self.group_vidas = pygame.sprite.Group()         #Lista con todas las vidas

        self.background, self.rect = load_png("nightSky.png")
        self.textos = Texts()

        self.lastAreaCheck = 0
Example #2
0
    def __init__(self, imagen, heading, speed, pos):
        pygame.sprite.Sprite.__init__(self)
        self.image, self.rect = load_png(imagen)
        self.rect.topleft = pos
        self.heading = heading
        self.speed = speed
        self.time_passed = 0
        self.lastshot = 0

        self.hit = False
        self.hit_time = 1 #how much time is going to last de animation
        self.was_hit = 0 #how much time the animation has been active

        self.life = 0
        self.impact_damage = 0
        self.type = 'ship'
Example #3
0
 def not_hit(self, imagen):
     self.hit = False
     self.was_hit = 0
     self.image, rect = load_png(imagen)
Example #4
0
 def is_hit(self, imagen):
     #Actualiza el sprite del objeto al estado de 'tocado'
     self.hit = True
     self.was_hit = 0
     self.image, rect = load_png(imagen)
Example #5
0
 def not_hit(self):
     self.hit = False
     self.was_hit = 0
     self.image, rect = load_png("Nucleo.png")
Example #6
0
 def is_hit(self):
     self.hit = True
     self.was_hit = 0
     self.image, rect = load_png('Nucleo_hit.png')
Example #7
0
 def not_hit(self):
     self.hit = False
     self.was_hit = 0
     self.image, rect = load_png("Bombardero.png")
Example #8
0
 def is_hit(self):
     self.hit = True
     self.was_hit = 0
     self.image, rect = load_png('Bombardero_hit.png')
Example #9
0
 def not_hit(self):
     self.hit = False
     self.was_hit = 0
     self.image, rect = load_png("Kamikaze.png")
Example #10
0
 def is_hit(self):
     self.hit = True
     self.was_hit = 0
     self.image, rect = load_png('Kamikaze_hit.png')
Example #11
0
 def not_hit(self):
     self.hit = False
     self.was_hit = 0
     self.image, rect = load_png("Hunter.png")
Example #12
0
 def is_hit(self):
     self.hit = True
     self.was_hit = 0
     self.image, rect = load_png('Hunter_hit.png')