def __init__(self, imagePath, x, y, colorkey=None, blendPath=None,
     owner='gaia'):
     # sets image and rect attributes
     # First class to inherit from Sprite
     
     DrawableObject.__init__(self, imagePath, colorkey, blendPath=blendPath,
         owner=owner)
     pygame.sprite.Sprite.__init__(self)
     
     # sets the topleft corner of the rectangle to (x,y)
     self.rect.topleft = (x,y)
     #self.realCenter=[x,y]
     #self.rect.center = (x,y)
     
     # this is the first initialization of owner
     #self.owner=owner # default to no owner
     
     # this is the first initialization of blockable
     # determines whether or not an object can be walked through
     # FUNCTIONALITY NOT CURRENTLY IMPLEMENTED
     self.blockable=False
     
     # rectangle used EXCLUSIVELY for collision detection
     # defaults to the image rectangle
     # NOTE: update methods need to move collRect with rect!
     # FUNCTIONALITY NOT CURRENTLY IMPLEMENTED
     self.collRect = self.rect
    def __init__(self, images, textfileName, x = 0, y = 0, transparent=False,
                    fps = 10, xVelocity = 0, yVelocity = 0 ):

        self._delay = 1000/fps
        self.xSpeed = xVelocity
        self.ySpeed = yVelocity
        
        DrawableObject.__init__(self, images, textfileName, x, y)
    def __init__(self, menu, image = "orbBlack.png",imageKey = -1, \
        title = 'None',size = 32,col = (0,0,255),callback=Callback(lambda:None)):

        DrawableObject.__init__(self,image,imageKey) #Should be different for each item
        
        self.title = title
        self.size = size
        self.color = col
        self.menu = menu
        self.callback = callback
        self.submenu = None
Exemplo n.º 4
0
    def __init__(self,
                 images,
                 textfileName,
                 fps=10,
                 x=0,
                 y=0,
                 xVelocity=0,
                 yVelocity=0):

        DrawableObject.__init__(self, images, textfileName, fps, x, y,
                                xVelocity, yVelocity)
Exemplo n.º 5
0
    def __init__(self,
                 images,
                 textfileName,
                 fps=10,
                 x=0,
                 y=0,
                 xVelocity=0,
                 yVelocity=0):

        self._delay = 1000 / fps
        DrawableObject.__init__(self, images, textfileName, x, y)
Exemplo n.º 6
0
    def __init__(self,
                 images,
                 textfileName,
                 x=0,
                 y=0,
                 transparent=False,
                 fps=10,
                 xVelocity=0,
                 yVelocity=0):

        self._delay = 1000 / fps
        self.xSpeed = xVelocity
        self.ySpeed = yVelocity

        DrawableObject.__init__(self, images, textfileName, x, y)
    def __init__(self,images,textfileName,fps = 10, x = 0, y = 0, xVelocity = 0, yVelocity = 0):

        DrawableObject.__init__(self, images, textfileName, fps, x, y, xVelocity, yVelocity)
Exemplo n.º 8
0
    def __init__(self,images,textfileName,fps = 10, x = 0, y = 0, xVelocity = 0, yVelocity = 0):

        self._delay = 1000/fps
        DrawableObject.__init__(self, images, textfileName, x, y)
Exemplo n.º 9
0
    def __init__(self,text,font, x = 0, y = 0):

        self.font = font
        self.textImage = font.render(text, 1, (255,255,255))
        self.text = text
        DrawableObject.__init__(self, [self.textImage], '')
    def __init__(self, text, font, x=0, y=0):

        self.font = font
        self.textImage = font.render(text, 1, (255, 255, 255))
        self.text = text
        DrawableObject.__init__(self, [self.textImage], '')