Advertisement
jabela

8 moving car 1a

Dec 19th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. #General Variables
  2. running = True
  3. window = pygame.display.set_mode((800,600))
  4. clock = pygame.time.Clock()
  5.  
  6. pygame.display.set_caption('Race car')
  7.  
  8. class car(pygame.sprite.Sprite):
  9.     def __init__(self,location):
  10.         pygame.sprite.Sprite.__init__(self)
  11.         self.image = pygame.image.load('racecar.png').convert_alpha()
  12.         self.rect = self.image.get_rect()
  13.         self.rect.left,self.rect.top = location
  14.         self.x_change = 0
  15.         self.x = 370
  16.         self.y = 430
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement