Forklift image #2

Merged
s473598 merged 1 commits from s473598_wozek_image into master 2023-03-11 00:53:08 +01:00
2 changed files with 46 additions and 27 deletions
Showing only changes of commit fc494403a2 - Show all commits

23
main.py
View File

@ -3,9 +3,24 @@ import sys
pygame.init()
screen = pygame.display.set_mode((1280, 720))
wozek = pygame.Rect(55,55,50,50)
c = (0, 150, 0)
class Wozek:
def __init__(self):
self.x = 55
self.y = 55
self.height = 64
self.width = 64
self.image = pygame.image.load("wozek.png")
# Credit: Forklift icons created by Smashicons - Flaticon
# https://www.flaticon.com/free-icons/forklift
def draw(self):
screen.blit(self.image, (self.x, self.y))
def main():
wozek = Wozek()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
@ -34,5 +49,9 @@ while True:
#Drawing
screen.fill((0,0,0)) #removes object trail
pygame.draw.rect(screen, (0,150,255), wozek) #resolution, color, object
pygame.display.flip() #updating frames
wozek.draw()
if __name__ == "__main__":
main()

BIN
wozek.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB