Dummyclass for Gameobjects

This commit is contained in:
2024-01-16 21:26:36 +01:00
parent e01d187ea5
commit 410ce9f72b
2 changed files with 25 additions and 2 deletions

View File

@@ -78,6 +78,8 @@ player = Player("Player", MAINSCREEN, MAINSCREEN_SIZE, 10, 10, 10, is_player=Fal
testobj = GameObject("TESTOBJEKT", MAINSCREEN, MAINSCREEN_SIZE, 0,0,0,image="data/models/testmodel.bmp")
test = pygame.image.load("data/models/testmodel.bmp").convert()
goo = GOIMAGE("TESTOBJEKT", MAINSCREEN, MAINSCREEN_SIZE, 0,0,0,image="data/models/testmodel.bmp")
background = pygame.surface.Surface((640,480))
@@ -93,7 +95,7 @@ print("Es wurden " + str(count_spawend_enities)+ " Objekte gespawnt")
testx = 10
testy = 10
#Fenster-Hauptschleife
#Fenster-Hauptschleife+
while active == True:
MAINSCREEN.fill((255,255,255))
for event in pygame.event.get():
@@ -118,6 +120,7 @@ while active == True:
testx += 1
if(testx >= MAINSCREEN_SIZE[0]): testx = (0 - test.get_size()[0])
MAINSCREEN.blit(test, (testx,testy))
goo.draw()
player.draw()
player.update_pos_lastframe(player.get_position()[0], player.get_position()[1], False)