예제 #1
0
 def __init__(self,entries,initialentry=None):
     Renderable.__init__(self)
     self.selectedentry=initialentry
     self.entrylist=list()
     for i in entries:
         if not self.selectedentry:
             self.selectedentry=i
             self.entrylist.append(self.selectedentry)
             continue
         self.entrylist.append(i)
예제 #2
0
 def __init__(self,worldnum,stagenum,datafile=None):
     Renderable.__init__(self)
     self.world=worldnum
     self.stage=stagenum
     self.time=-2000
     self.size = self.screen.get_size()
     self.playerstart = (0,500)
     self.background = pygame.image.load("assets"+os.sep+"world"
     +os.sep+str(worldnum)+os.sep+"background.jpg")
     if datafile:
         self.from_file(datafile)
     else:
         self.from_number(worldnum,stagenum)
예제 #3
0
 def __init__(self,level):
     Renderable.__init__(self)
     self.world=level.world
     self.background=level.background
     self.bkd_pos = 0
     self.objectdict=level.objectdict
     self.complete = level.complete
     self.size = level.size
     self.keyinput = 0 
     self.tile_bkd()
     if self.objectdict:
         for i in self.objectdict.iterkeys():
             self.objectdict[i].draw_on(self.background,i)
     self.player = GlobalObjects.playercharacters[self.world]
     self.is_jumping = False