# Creates a Dot Instance.
class Dot(object):
velx=0
vely=0
def __init__(self, xloc=0, yloc=0,color=(0,7,0)):
self.color=color
self.xloc=xloc
self.yloc=xloc
def entity(self):
for event in pygame.event.get():
pygame.draw.rect(gameDisplay, (self.color), (self.xloc,self.yloc, 50, 50))
pygame.display.update()
GameExit=False
# Main Function
def Main():
global x,y,gameDisplay
Red=Dot(50,50,color=(0,0,255))
Blue=Dot(150,150,color=(255,0,0))
Red.entity()
Blue.entity()
pygame.display.update()
while not GameExit:
if GameExit==False:
pygame.QUIT
Main()
Im trying to create a second class instance that will display a Red Dot but it doesn't seem to be appearing. The first class instance works and it creates a Blue Dot on the Display. What is it that I am doing wrong?