def draw(self): # to make this a little more interesting we'll tint it and spin it around PC.setColourize(1) # enable tinting PC.setColour(255, 45, 45, 127) # tint red and semi transparent PC.drawImageRotF(self.image, self.x - self.width * 0.5, self.y - self.height * 0.5, self.a) # draw rotated image PC.setColourize(0) # disable tinting
def draw(): # clear the screen PC.setColour(255, 255, 255, 255) PC.fillRect(0, 0, 800, 600) # draw the player player.draw() # draw the things for t in things: t.draw()
def draw(): # clear the screen PC.setColour( 255, 255, 255, 255 ) PC.fillRect( 0, 0, 800, 600 ) # draw the player player.draw() # draw the things for t in things: t.draw()
def draw(self): if self.definition.has_key("image"): print "image tiles not yet supported" elif self.definition.has_key("color"): PC.setColour( TileColors[self.definition["color"]]["red"], TileColors[self.definition["color"]]["green"], TileColors[self.definition["color"]]["blue"], 255, ) PC.fillRect(self.x, self.y, self.s, self.s) else: print "tile must have color or image attribute"
def draw(): # set the game font PC.setFont(gameFont) # make a white screen to initialize the framebuffer PC.setColour(255, 255, 255, 255) PC.fillRect(0, 0, screenWidth, screenHeight); # draw the player player.draw() # display the player's angle for debugging purposes PC.setColour(0, 0, 0, 255) PC.drawString(str(player.angle), 5, 25)
def draw( self ): # to make this a little more interesting we'll tint it and spin it around PC.setColourize( 1 ) # enable tinting PC.setColour( 255, 45, 45, 127 ) # tint red and semi transparent PC.drawImageRotF( self.image, self.x - self.width * 0.5, self.y - self.height * 0.5, self.a ) # draw rotated image PC.setColourize( 0 ) # disable tinting
def draw(): PC.setColour(255, 255, 255, 255) PC.fillRect(0, 0, 800, 600) map.draw()