Added methods to Gamobjects class
This commit is contained in:
@@ -1,10 +1,23 @@
|
||||
import pygame
|
||||
|
||||
class GameObjects():
|
||||
def __init__(self, name, posx:int, posy:int) -> None:
|
||||
def __init__(self, name, posx:int, posy:int, sprite:str) -> None:
|
||||
self.posx = posx
|
||||
self.posy = posy
|
||||
self.name = name
|
||||
|
||||
self.sprite:str = ""
|
||||
self.rect:pygame.rect
|
||||
if(sprite != ""):
|
||||
pygame.image.load(sprite)
|
||||
|
||||
pass
|
||||
|
||||
|
||||
def move(self, x,y):
|
||||
self.posx = x
|
||||
self.posy = y
|
||||
pass
|
||||
|
||||
def draw(self):
|
||||
pygame.Surface.blit()
|
||||
pass
|
||||
Reference in New Issue
Block a user