Пример #1
0
 def __init__(self):
     AbstractGroup.__init__(self)
Пример #2
0
 def __init__(self):
     AbstractGroup.__init__(self)
     self._spritelist = []
Пример #3
0
 def add_internal(self, sprite):
     AbstractGroup.add_internal(self, sprite)
     self._spritelist.append(sprite)
Пример #4
0
	def __init__(self, owner_map, *sprites):
		AbstractGroup.__init__(self)
		self.add(*sprites)
		self.owner_map = owner_map
		owner_map.group = self
Пример #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():
Пример #6
0
 def __init__(self):
     AbstractGroup.__init__(self)
     self.zorder = []
Пример #7
0
 def remove(self, sprite):
     AbstractGroup.remove(self, sprite)
     self.sort_by_z()
Пример #8
0
 def add(self, sprite):
     AbstractGroup.add(self, sprite)
     self.sort_by_z()