Changeset 399:a7d48819a711


Ignore:
Timestamp:
Sep 6, 2013, 11:21:32 PM (7 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Message:

Reselt world on death

Location:
nagslang
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • nagslang/engine.py

    r322 r399  
    5151                    self._surface = pygame.display.get_surface()
    5252                elif ScreenChange.matches(ev):
    53                     self._world.save()
    5453                    self._surface.fill(pygame.color.Color(0, 0, 0))
    5554                    self.change_screen(ev.screen)
  • nagslang/protagonist.py

    r394 r399  
    344344        # Handle player death - may be called due to other reasons
    345345        # than zero health
     346        self.world.load()
    346347        self.world.deaths += 1
    347348        ScreenChange.post('dead')
  • nagslang/screens/area.py

    r396 r399  
    173173                self.world.rooms += 1
    174174                self.world.level = (ev.destination, ev.dest_pos)
     175                self.world.save()
    175176                ScreenChange.post(ev.destination)
    176177                return
  • nagslang/screens/menu.py

    r398 r399  
    5454    def restart(self):
    5555        self.world.reset()
     56        self.world.save()
    5657        self.setup()
    5758
Note: See TracChangeset for help on using the changeset viewer.