コード例 #1
0
ファイル: menu.py プロジェクト: ilathid/ilathidEngine
def newgameenter():
    # FIXME: at this time there is no code to clean up paths added by 'push_age'
    
    if parameters.testCustomAge is not None:
        exec """from $AGE import $AGE
filemanager.push_age('$AGE')
globals.currentage = $AGE()""".replace("$AGE", parameters.testCustomAge)
    else:
        from DniChamberAge import DniAge
        filemanager.push_age('Dni')
        globals.currentage = DniAge()
    
    #from FooAge import FooAge
    #filemanager.push_age('FooAge')
    #globals.currentage = FooAge()
    
    SlideManager.resetStackTo([globals.currentage.getslide(globals.currentage.getStartLocation())])
    return None
コード例 #2
0
ファイル: SaveHandler.py プロジェクト: ilathid/ilathidEngine
 def endElement(self,name):
     #We put the buffer in the object
     if name == 'age':
         self.file=str(self.buffer)
         #We load the age so we can update the state afterwards
         
         # FIXME: find a cleaner way to find which age it is than hardcoding
         if "dni.xml" in self.file:
             from DniChamberAge import DniAge
             filemanager.push_age('Dni')
             globals.currentage = DniAge()
         else:
             raise Exception("Unknown age " + self._file)
     if name == 'slide':
         self.slide=str(self.buffer)
     if name == 'Save':
         #save slide load
         self.slide_obj = globals.currentage.getslide(self.slide)