Changeset 530:bc053b9ab53f


Ignore:
Timestamp:
Sep 7, 2013, 6:58:24 PM (7 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
rebase_source:
eb9570dfb6eb8c3b9c662a7ca143e9e8aae5f8cd
Message:

Load on startup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/world.py

    r510 r530  
    1818        self.__dict__['protagonist'] = Protagonist(
    1919            pymunk.Space(), self, Level.game_starting_point()[1])
    20         self.reset()
     20        self.reset(load=True)
    2121
    22     def reset(self):
     22    def reset(self, load=False):
    2323        self.__dict__['_data'] = {
    2424            'attacks': 0,
     
    3131            'inventory': set(),
    3232        }
    33         self.save()
     33        if load:
     34            self.load()
     35        else:
     36            self.save()
    3437
    3538    def __getattr__(self, name):
Note: See TracChangeset for help on using the changeset viewer.