Mercurial > pyntnclick
comparison gamelib/main.py @ 24:9d5de13e2ac3
Add a game screen. So far, the game content looks a *lot* like the main menu.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Sun, 22 Aug 2010 18:09:25 +0200 |
parents | 177e3a7825e8 |
children | f9e697e0c6ba |
comparison
equal
deleted
inserted
replaced
23:1e90a3e4618e | 24:9d5de13e2ac3 |
---|---|
9 import pygame | 9 import pygame |
10 from pygame.locals import SWSURFACE, SRCALPHA | 10 from pygame.locals import SWSURFACE, SRCALPHA |
11 from albow.dialogs import alert | 11 from albow.dialogs import alert |
12 from albow.shell import Shell | 12 from albow.shell import Shell |
13 from menu import MenuScreen | 13 from menu import MenuScreen |
14 from gamescreen import GameScreen | |
14 from constants import SCREEN | 15 from constants import SCREEN |
15 | 16 |
16 class MainShell(Shell): | 17 class MainShell(Shell): |
17 def __init__(self, display): | 18 def __init__(self, display): |
18 Shell.__init__(self, display) | 19 Shell.__init__(self, display) |
19 self.menu_screen = MenuScreen(self) | 20 self.menu_screen = MenuScreen(self) |
21 self.game_screen = GameScreen(self) | |
20 self.show_screen(self.menu_screen) | 22 self.show_screen(self.menu_screen) |
21 | 23 |
22 def main(): | 24 def main(): |
23 pygame.init() | 25 pygame.init() |
24 display = pygame.display.set_mode(SCREEN) | 26 display = pygame.display.set_mode(SCREEN) |