Some cleanup

This commit is contained in:
Christian
2024-08-24 12:03:24 +02:00
parent 31a695f099
commit 923f476303
3 changed files with 44 additions and 36 deletions

View File

@@ -151,11 +151,8 @@ class Enemy(GameObject):
self.weapon:Weapons = None
def fire(self, screen):
#print("Schieße!!!!")
#shot = Projectile("Enemy", self.pos_x+(self.width/2),self.pos_y+self.height,5,10, screen, 2)
self.weapon.fire()
def firecontrol(self, screen):
if(len(Projectile.shots) > 0):
for objects in Projectile.shots:
@@ -220,9 +217,9 @@ class Weapons(GameObject):
class Item(GameObject):
def __init__(self, name, pos_x, pos_y, width, height, image=None) -> None:
super().__init__(name, pos_x, pos_y, width, height, image)
self.speed = 5
self.speed = 2
def move(self, x, y):
def move(self, x:int, y:int):
self.pos_x += x
self.pos_y += y