Browse Source

Redacted

master
Unbewohnte 4 years ago
parent
commit
5b27037654
  1. 1
      Main.py
  2. 2
      enemy.py

1
Main.py

@ -19,7 +19,6 @@ pygame.display.set_icon(icon)
bullet_image = pygame.image.load('pics/second_bullet.png') bullet_image = pygame.image.load('pics/second_bullet.png')
enemy_image = pygame.image.load('pics/enemy.png') enemy_image = pygame.image.load('pics/enemy.png')
player_image = pygame.image.load('pics/player.png') player_image = pygame.image.load('pics/player.png')
arrow_img = pygame.image.load('pics/arrow.png')
####### #######
#rand_color = (int(random.randint(0,254)),int(random.randint(0,254)) ,int(random.randint(0,254))) #rand_color = (int(random.randint(0,254)),int(random.randint(0,254)) ,int(random.randint(0,254)))

2
enemy.py

@ -16,7 +16,7 @@ class Enemy:
pygame.draw.rect(window,en_color,(self.enemy_x, self.enemy_y, self.en_width, self.en_height)) pygame.draw.rect(window,en_color,(self.enemy_x, self.enemy_y, self.en_width, self.en_height))
window.blit(en_image,(self.enemy_x, self.enemy_y)) window.blit(en_image,(self.enemy_x, self.enemy_y))
def update(self): def update(self):
self.enemy_x += 3 #self.vel here #3 self.enemy_x += 3
if self.enemy_x >= 600: if self.enemy_x >= 600:
self.enemy_x = 1 self.enemy_x = 1
def enemy_shoot(self): def enemy_shoot(self):

Loading…
Cancel
Save