erstellen simulation.py und image ordner

This commit is contained in:
moritz 2024-07-05 12:59:33 +02:00
parent 967a74eb2d
commit 437d8e3c25
2 changed files with 32 additions and 0 deletions

BIN
images/stickman.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

32
simulation.py Normal file
View file

@ -0,0 +1,32 @@
import pygame
pygame.init()
SCREEN_WIDTH = 1280
SCREEN_HEIGHT = 720
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
screen.fill("Grey")
stickman = pygame.image.load("images/stickman.png")
stickman = pygame.transform.scale(stickman, (30.072, 67.2))
if __name__ == "__main__":
run = True
while run:
key = pygame.key.get_pressed()
if key[pygame.K_a] == True:
print("a")
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
screen.blit(stickman, (0,0))
pygame.display.update()
pygame.quit()