Beispiel #1
0
 def __init__(self, text, position):
     gameSprite.__init__(self, position)
     self.image = font.gamefont().text(text)
     print self.image
     self.rect.center = position
Beispiel #2
0
"""
settings = settings.load()

ORIGIN = (0, 0)
VIEW_WIDTH = settings['screen-width']
VIEW_HEIGHT = settings['screen-height']
DIMENSIONS = (VIEW_WIDTH, VIEW_HEIGHT)

screen = render.init(DIMENSIONS)
pygame.display.set_icon(pygame.image.load('ico.png').convert_alpha())
pygame.display.set_caption("Tittle's Adventures")
background = imageload('background/sky_city.png')


player = None
gfont = font.gamefont()


"""
Starts the game, loads the player and first level (temporary, to
be placed into its own handler)
"""
def startGame(cont = False):
    # startgame should init a new 'playstate' object
    
    # initiate global stuff
    global mouse
    global mtext
    mtext = ''
    
    mouse = cursor((VIEW_WIDTH/2, VIEW_HEIGHT/2))