Trashmaster/agent.py

15 lines
383 B
Python
Raw Normal View History

2022-03-09 22:39:34 +01:00
import pygame.image
class trashmaster(pygame.sprite.Sprite):
2022-03-11 13:00:11 +01:00
def __init__(self,x,y,img,vel):
2022-03-09 22:39:34 +01:00
super().__init__()
2022-03-11 13:00:11 +01:00
self.x=x
self.y=y
self.img = img
self.velocity = vel
self.image = pygame.image.load(img)
self.image = pygame.transform.scale(self.image, (self.x,self.y))
2022-03-09 22:39:34 +01:00
self.rect = self.image.get_rect()