Merge pull request 'refactor_agent2' (#3) from refactor_agent2 into master
Reviewed-on: #3
This commit is contained in:
commit
18b92c4e3d
16
agent.py
16
agent.py
@ -1,14 +1,14 @@
|
|||||||
import pygame.image
|
import pygame.image
|
||||||
|
|
||||||
|
|
||||||
class trashmaster(pygame.sprite.Sprite):
|
class trashmaster(pygame.sprite.Sprite):
|
||||||
def __init__(self):
|
def __init__(self,x,y,img,vel):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
self.images = []
|
self.x=x
|
||||||
self.image = pygame.image.load("resources/textures/trashmaster_blu.png")
|
self.y=y
|
||||||
self.image = pygame.transform.scale(self.image, (16, 16))
|
self.img = img
|
||||||
self.images.append(self.image)
|
self.velocity = vel
|
||||||
|
|
||||||
|
self.image = pygame.image.load(img)
|
||||||
|
self.image = pygame.transform.scale(self.image, (self.x,self.y))
|
||||||
self.rect = self.image.get_rect()
|
self.rect = self.image.get_rect()
|
||||||
|
|
||||||
garbagetruck_list = pygame.sprite.Group()
|
|
||||||
|
2
main.py
2
main.py
@ -34,7 +34,7 @@ def main():
|
|||||||
game = WalleGame()
|
game = WalleGame()
|
||||||
game.update_window()
|
game.update_window()
|
||||||
|
|
||||||
smieciara_object = trashmaster()
|
smieciara_object = trashmaster(16,16,"resources/textures/trashmaster_blu.png",16)
|
||||||
game.draw_trashmaster(smieciara_object)
|
game.draw_trashmaster(smieciara_object)
|
||||||
|
|
||||||
game.update_window()
|
game.update_window()
|
||||||
|
Loading…
Reference in New Issue
Block a user