2020-04-07 16:58:12 +02:00
|
|
|
import pygame
|
|
|
|
from pygame.math import Vector2
|
|
|
|
|
|
|
|
class Traktor(object):
|
|
|
|
|
|
|
|
def __init__(self, game):
|
|
|
|
#przekazywanie okiektu gra obiektowi traktor
|
|
|
|
self.game = game
|
2020-04-28 21:15:29 +02:00
|
|
|
self.x = 0
|
|
|
|
self.y = 0
|
|
|
|
self.punkt = 0
|
|
|
|
self.canSteer = True
|
2020-06-09 12:15:51 +02:00
|
|
|
self.myimage = pygame.image.load("./assets/player.png").convert()
|
|
|
|
self.myimage = pygame.transform.scale(self.myimage, (99, 99))
|
|
|
|
self.screen = pygame.display.set_mode((500, 500))
|
2020-04-28 21:15:29 +02:00
|
|
|
|
2020-04-07 16:58:12 +02:00
|
|
|
|
2020-06-09 12:15:51 +02:00
|
|
|
def rysowanie(self):
|
|
|
|
rect = self.myimage.get_rect()
|
|
|
|
rect.center = (self.x+50, self.y+50)
|
|
|
|
self.screen.blit(self.myimage, rect)
|