Beispiel #1
0
 def __init__(self, game):
     AnimatedElement.__init__(self)
     self.Game = game
     self.setName("fire")
     self.setTitle("Fire")
     self.addSequence(
         "default",
         [
             self.Game.get("FIRE_DEFAULT_1"),
             self.Game.get("FIRE_DEFAULT_2"),
             self.Game.get("FIRE_DEFAULT_3"),
             self.Game.get("FIRE_DEFAULT_4"),
             self.Game.get("FIRE_DEFAULT_3"),
             self.Game.get("FIRE_DEFAULT_2"),
             self.Game.get("FIRE_DEFAULT_1"),
         ],
     )
     self.setPosition((540, 276))
     self.setActionPosition((434, 446))
     self.setLookMethod(self.fireLook)
     self.setUseMethod(self.fireUse)
Beispiel #2
0
    def __init__(self,game):
        AnimatedElement.__init__(self)
        self.Game = game
        
        self.setName("dungeonmap")
        self.setTitle('Dungeon map')
        self.setImage(self.Game.get('MAP_DEFAULT'))
        self.setPosition((330,326))
        self.setActionPosition((410,500))
     
        self.setLookMethod(self.mapLook)
        self.setUseMethod(self.mapUse)        
        
        self.window = ElementWindow(self.Game)
        self.window.setBackground(self.Game.get('MAP_BACKGROUND'))
        self.window.setOpenMethod(self.openMapWindow)
        self.window.setCloseMethod(self.closeMapWindow)
                   
        cross = Widget()
        cross.setName('cross')
        cross.setTitle('You are here')
        cross.setImage(self.Game.get('MAP_CROSS'))
        cross.setPosition((338,208))
        self.window.addWidget(cross)

        room1 = Widget()
        room1.setName('cross')
        room1.setTitle('The Sunmine')
        room1.setImage(self.Game.get('MAP_SUNMINE'))
        room1.setPosition((80,127))
        self.window.addWidget(room1)

        room2 = Widget()
        room2.setName('cross')
        room2.setTitle('The Gates')
        room2.setImage(self.Game.get('MAP_GATES'))
        room2.setPosition((360,64))
        self.window.addWidget(room2)
        
        room3 = Widget()
        room3.setName('cross')
        room3.setTitle("The Elderbeards' chamber")
        room3.setImage(self.Game.get('MAP_CHAMBER'))
        room3.setPosition((520,84))
        self.window.addWidget(room3)
        
        room4 = Widget()
        room4.setName('cross')
        room4.setTitle('The Underfjord')
        room4.setImage(self.Game.get('MAP_UNDERFJORD'))
        room4.setPosition((530,365))
        self.window.addWidget(room4)
        
        room5 = Widget()
        room5.setName('cross')
        room5.setTitle('The altar')
        room5.setImage(self.Game.get('MAP_ALTAR'))
        room5.setPosition((244,378))
        self.window.addWidget(room5)

        room6 = Widget()
        room6.setName('cross')
        room6.setTitle('The Quarry')
        room6.setImage(self.Game.get('MAP_QUARRY'))
        room6.setPosition((125,305))
        self.window.addWidget(room6)

        cross.setClickMethod(self.crossClick)        
        room1.setClickMethod(self.room1Click)
        room2.setClickMethod(self.room2Click)
        room3.setClickMethod(self.room3Click)
        room4.setClickMethod(self.room4Click)
        room5.setClickMethod(self.room5Click)
        room6.setClickMethod(self.room6Click)