Example #1
0
 def __init__(self):
     """ Sun item constructor. """
     Item.__init__(self)
     self.__visual1 = VisualObject(os.path.join("data", "sun.png"))
     self.__visual2 = VisualObject(os.path.join("data", "sun2.png"))
     self.__visual1.move (300,10)
     self.__visual2.move (300,10)
     self.visual = self.__visual1
     self.registerEvent("projectile")
     self.registerEvent("game")
Example #2
0
 def __init__(self, id):
     """ Weapon item constructor. """
     Item.__init__(self, id)
     self.__angle = None
     self.__strength = None
     fontname = pygame.font.get_default_font()
     self.__font = pygame.font.SysFont(fontname, 14)
     self.__font_color = (255, 255, 255, 255)
     self.__font_background = (0, 0, 0, 0)
     self.x, self.y = (None, 10)
     self.character_pos = {}
     self.active_character = None
     self.registerEvent("weapon")
     self.registerEvent("character")
Example #3
0
 def __init__(self, id):
     """ Weapon item constructor. """
     Item.__init__(self, id)
     self.__angle = None 
     self.__strength = None
     fontname = pygame.font.get_default_font()
     self.__font = pygame.font.SysFont(fontname, 14)
     self.__font_color = (255,255,255,255)
     self.__font_background = (0,0,0,0)
     self.x, self.y = (None, 10)
     self.character_pos = {}
     self.active_character = None
     self.registerEvent("weapon")
     self.registerEvent("character")
Example #4
0
 def __init__(self, id):
     """ Character item constructor.
     @param id:  Server item id.
     @type id: C{int}
     @param name: Character name.
     @type name: C{str}
     """
     Item.__init__(self, id)
     self.__x = None
     self.__y = None
     self.__id = id
     self.__name = "unamed%s" %id
     self.visual = VisualObject(os.path.join("data", "gorilla.png"))
     self.active = False
     self.registerEvent("character")
Example #5
0
 def item(self):
     return Item(self._connector, self._api_prefix)
Example #6
0
 def __init__(self, id):
     """ World item constructor. """
     Item.__init__(self, id)
     self.__buildings = []
     self.registerEvent("world")
 def __init__(self, id):
     """ Projectile itemp constructor. """
     Item.__init__(self, id)
     self.visual = VisualObject(os.path.join("data", "banana.png"))
     self.registerEvent("projectile")
Example #8
0
 def __init__(self, id):
     """ World item constructor. """
     Item.__init__(self, id)
     self.__buildings = []
     self.registerEvent("world")
 def __init__(self, id):
     """ Projectile itemp constructor. """
     Item.__init__(self, id)
     self.visual = VisualObject(os.path.join("data", "banana.png"))
     self.registerEvent("projectile")
Example #10
0
 def __init__(self, id):
     Item.__init__(self, id)
     self.registerEvent("log")