예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #5
0
 def __init__(self, id):
     """ World item constructor. """
     Item.__init__(self, id)
     self.__buildings = []
     self.registerEvent("world")
예제 #6
0
 def __init__(self, id):
     """ Projectile itemp constructor. """
     Item.__init__(self, id)
     self.visual = VisualObject(os.path.join("data", "banana.png"))
     self.registerEvent("projectile")
예제 #7
0
 def __init__(self, id):
     """ World item constructor. """
     Item.__init__(self, id)
     self.__buildings = []
     self.registerEvent("world")
예제 #8
0
 def __init__(self, id):
     """ Projectile itemp constructor. """
     Item.__init__(self, id)
     self.visual = VisualObject(os.path.join("data", "banana.png"))
     self.registerEvent("projectile")
예제 #9
0
 def __init__(self, id):
     Item.__init__(self, id)
     self.registerEvent("log")