refactor_agent2
This commit is contained in:
parent
049cc5126f
commit
039ea1d188
16
agent.py
16
agent.py
@ -1,14 +1,14 @@
|
||||
import pygame.image
|
||||
|
||||
|
||||
class trashmaster(pygame.sprite.Sprite):
|
||||
def __init__(self):
|
||||
def __init__(self,x,y,img,vel):
|
||||
super().__init__()
|
||||
|
||||
self.images = []
|
||||
self.image = pygame.image.load("resources/textures/trashmaster_blu.png")
|
||||
self.image = pygame.transform.scale(self.image, (16, 16))
|
||||
self.images.append(self.image)
|
||||
self.rect = self.image.get_rect()
|
||||
self.x=x
|
||||
self.y=y
|
||||
self.img = img
|
||||
self.velocity = vel
|
||||
|
||||
garbagetruck_list = pygame.sprite.Group()
|
||||
self.image = pygame.image.load(img)
|
||||
self.image = pygame.transform.scale(self.image, (self.x,self.y))
|
||||
self.rect = self.image.get_rect()
|
||||
|
Loading…
Reference in New Issue
Block a user