Code cleanup
Added testmodel bitmap Added Prototype for imagemodels
This commit is contained in:
@@ -19,7 +19,7 @@ class GameObject():
|
||||
|
||||
__movedirection = {"up":False, "down":False, "left":False, "right":False}
|
||||
|
||||
def __init__(self, name:str, surface, mainscreensize:tuple, posx_init:int=0, posy_init:int=0, move_speed:int=0, is_player:bool = False, is_rect:bool = True, rect_size:tuple = (10,10)) -> None:
|
||||
def __init__(self, name:str, surface, mainscreensize:tuple, posx_init:int=0, posy_init:int=0, move_speed:int=0, is_player:bool = False, is_rect:bool = True, rect_size:tuple = (10,10), image = str()) -> None:
|
||||
self.__name = name
|
||||
self.__pos_x = posx_init
|
||||
self.__pos_y = posy_init
|
||||
@@ -37,6 +37,14 @@ class GameObject():
|
||||
self.__surface = surface
|
||||
self.__mainscreensize = mainscreensize
|
||||
self.__score = 0
|
||||
self.__imagepath = image
|
||||
self.__imageloaded = 0
|
||||
if(len(self.__imagepath) > 0):
|
||||
print(self.__imagepath)
|
||||
test = pygame.image.load(self.__imagepath).convert()
|
||||
self.__surface.blit(test, (10,10))
|
||||
|
||||
|
||||
|
||||
#self.__rectobjekt = rect
|
||||
|
||||
|
||||
Reference in New Issue
Block a user