Changeset 54 for trunk/PARPG/run.py


Ignore:
Timestamp:
05/08/09 14:54:53 (11 years ago)
Author:
maximinus_parpg
Message:

Set Model / View data model for PARPG.
Code no longer looks like Rio demo.
Started to split map from objects.
Added crate and NPC character.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PARPG/run.py

    r48 r54  
    2323import fife, fifelog 
    2424from scripts import world 
     25from scripts import engine 
    2526from scripts.common import eventlistenerbase 
    2627from basicapplication import ApplicationBase 
     
    5556 
    5657class PARPG(ApplicationBase): 
    57     """Main Application class""" 
     58    """Main Application class 
     59       We use an MV data model. 
     60       self.world is our view 
     61       self.engine is our model""" 
    5862    def __init__(self): 
    5963        super(PARPG,self).__init__() 
    6064        self.world = world.World(self.engine) 
     65        self.model = engine.Engine(self.world) 
    6166        self.listener = ApplicationListener(self.engine, self.world) 
    62         self.world.load(str(TDS.readSetting("MapFile"))) 
     67        self.model.loadMap(str(TDS.readSetting("MapFile"))) 
    6368 
    6469    def loadSettings(self): 
Note: See TracChangeset for help on using the changeset viewer.