Changeset 321:0d7885e2f063


Ignore:
Timestamp:
09/06/13 00:03:16 (8 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Rebase:
32336138313763653038326665326235663934323937326131326438383638643239623834316533
Message:

Add means for listing levels and areas.

Location:
nagslang
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • nagslang/level.py

    r317 r321  
    5656            'enemies': self._enemies,
    5757        }, f)
     58
     59    @classmethod
     60    def list_levels(cls):
     61        with resources.get_file('levels', 'LEVELS') as f:
     62            levels = load(f)
     63            return levels['levels']
    5864
    5965    def load(self, space):
  • nagslang/screens/area.py

    r319 r321  
    8383    def teardown(self):
    8484        sound.stop()
     85
     86    @classmethod
     87    def list_areas(self):
     88        return Level.list_levels()
    8589
    8690    def _player_collision_pre_solve_handler(self, space, arbiter):
Note: See TracChangeset for help on using the changeset viewer.