Exemplo n.º 1
0
	def _create_meteor(self , meteor_number , row_number):
		meteor = Meteor(self)
		meteor_width , meteor_height = meteor.rect.size
		meteor.x = 20 + meteor_width + 2 * meteor_width * meteor_number
		meteor.rect.x = meteor.x
		meteor.rect.y = meteor.rect.height + 2 * meteor.rect.height * row_number
		self.meteors.add(meteor)
Exemplo n.º 2
0
def create_meteor(ai_settings, screen, meteors, meteor_number, row_number):
    """Create a meteor and place it in the row."""
    meteor = Meteor(ai_settings, screen)
    meteor_width = meteor.rect.width
    meteor.x = meteor_width + 2 * meteor_width * meteor_number
    meteor.rect.y = meteor.rect.height + 2 * meteor.rect.height * row_number
    meteor.rect.x = meteor.x
    meteors.add(meteor)