Example #1
0
 def __init__(self):
     AbstractGroup.__init__(self)
Example #2
0
 def __init__(self):
     AbstractGroup.__init__(self)
     self._spritelist = []
Example #3
0
 def add_internal(self, sprite):
     AbstractGroup.add_internal(self, sprite)
     self._spritelist.append(sprite)
Example #4
0
	def __init__(self, owner_map, *sprites):
		AbstractGroup.__init__(self)
		self.add(*sprites)
		self.owner_map = owner_map
		owner_map.group = self
Example #5
0
# print(rect)
# print(rect.centerx)
# print(rect.bottom)
# print(rect.midleft)


class AbstractPrint(Sprite):
    def __init__(self):
        super().__init__()
        self.lines = 'abstract'

    def update(self):
        print(self.lines + " * ")


abstract_prints = AbstractGroup()
for numb in range(4):
    abstract_print = AbstractPrint()
    abstract_prints.add(abstract_print)
    print(abstract_print.lines + " " + str(numb) + " *")
print(abstract_prints.update())
print(abstract_prints.spritedict)

# def shot_bullet():

#     pygame.init()
#     pygame.display.set_mode((100, 100))
#     # abstract_bullets = AbstractGroup()
#     bullets = Group()
#     while True:
#         for event in pygame.event.get():
Example #6
0
 def __init__(self):
     AbstractGroup.__init__(self)
     self.zorder = []
Example #7
0
 def remove(self, sprite):
     AbstractGroup.remove(self, sprite)
     self.sort_by_z()
Example #8
0
 def add(self, sprite):
     AbstractGroup.add(self, sprite)
     self.sort_by_z()