erstellen simulation.py und image ordner
This commit is contained in:
parent
967a74eb2d
commit
437d8e3c25
BIN
images/stickman.png
Normal file
BIN
images/stickman.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
32
simulation.py
Normal file
32
simulation.py
Normal 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()
|
Loading…
Reference in a new issue