Updated enemy class
This commit is contained in:
5
Enemy.py
5
Enemy.py
@@ -9,7 +9,7 @@ class Enemy(GameObject.GameObject):
|
||||
|
||||
def fire(self, screen):
|
||||
print("Schieße!!!!")
|
||||
shot = Projectile(" ", self.pos_x+(self.width/2),self.pos_y+self.height,10,5, screen)
|
||||
shot = Projectile(" ", self.pos_x+(self.width/2),self.pos_y+self.height,5,10, screen)
|
||||
self.shots_fired.append(shot)
|
||||
|
||||
def shoot(self):
|
||||
@@ -36,4 +36,5 @@ class Projectile(GameObject.GameObject):
|
||||
|
||||
def animate(self):
|
||||
self.rect = pygame.draw.rect(self.screen, (0,0,0), (self.pos_x, self.pos_y, self.width, self.height))
|
||||
self.pos_y += self.speed
|
||||
self.pos_y += self.speed
|
||||
|
||||
|
||||
@@ -62,4 +62,3 @@ class Player(GameObject):
|
||||
self.pos_x += x
|
||||
if y != 0:
|
||||
self.pos_y += y
|
||||
|
||||
Reference in New Issue
Block a user