Changeset 165:8d45715c587d


Ignore:
Timestamp:
Apr 5, 2011, 10:09:56 PM (9 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
rebase_source:
f079577f5fe3e274f5f9383b0754a3abd0a81631
Message:

Rename ._game_state to game_state for consistency with engine and since everyone and their dog has access to it. :)

Location:
skaapsteker
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/cutscene.py

    r164 r165  
    4040                # Avoid circular import...
    4141                from .menuscene import MenuScene
    42                 ChangeScene.post(MenuScene(self._game_state))
     42                ChangeScene.post(MenuScene(self.game_state))
    4343        super(CutScene, self).dispatch(ev)
    4444
  • skaapsteker/engine.py

    r133 r165  
    5050    def __init__(self, game_state):
    5151        self.widgets = []
    52         self._game_state = game_state
     52        self.game_state = game_state
    5353
    5454    def post(self, ev):
  • skaapsteker/levelscene.py

    r150 r165  
    3131        for sprite in self._level.tiles:
    3232            self._world.add(sprite)
    33         for sprite in self._game_state.levels.get(self._level.name, []):
     33        for sprite in self.game_state.levels.get(self._level.name, []):
    3434            self._world.add(sprite)
    3535
     
    6363        import menuscene # avoid circular import
    6464        self.freeze()
    65         engine.ChangeScene.post(menuscene.MenuScene(self._game_state, self))
     65        engine.ChangeScene.post(menuscene.MenuScene(self.game_state, self))
    6666
    6767    def freeze(self):
  • skaapsteker/menuscene.py

    r134 r165  
    3030        "Callback from menu TextChoice"
    3131        if data.startswith('level'):
    32             ChangeScene.post(LevelScene(self._game_state, data))
     32            ChangeScene.post(LevelScene(self.game_state, data))
    3333        elif data == 'resume':
    3434            self.cur_game.thaw()
    3535            ChangeScene.post(self.cur_game)
    3636        elif data == 'cutscene':
    37             ChangeScene.post(opening_cutscene(self._game_state))
     37            ChangeScene.post(opening_cutscene(self.game_state))
    3838        elif data == 'quit':
    3939            pygame.event.post(pygame.event.Event(QUIT))
Note: See TracChangeset for help on using the changeset viewer.