python - How to place sprites onto rect object in pygame? -


I was wondering if any of you knew how I had already created a Reich object in PagMem Have a phantom attached?

Here is my code:

  blocker 1 = pygame.sprite.Sprite () blocktexture1.rect = self.platforms for blocks in self.platforms: pygame.draw .rect (screen, self, cloor, block, 0)  

I do not understand which rectangle to apply the Phantom Rect thing!

assign rect attribute to the rectangle you created . For example:

  example_sprite = pygame.sprite.Sprite () example_rect = pygame.Rect (0, 0, 50, 50) example_sprite.rect = example_rect  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -