Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame
- pygame.init()
- display = pygame.display.set_mode((400,300))
- clock = pygame.time.Clock()
- class Segment:
- def __init__(self):
- self.original = pygame.Surface((100,100), pygame.SRCALPHA)
- self.original.fill((200,200,200))
- self.count = 0
- def update(self):
- self.image = pygame.transform.rotate(self.original, self.count)
- self.rect = self.image.get_rect(center=display.get_rect().center)
- self.count = (self.count + 1) % 360
- segment = Segment()
- while not pygame.event.peek(pygame.QUIT):
- segment.update()
- display.fill((10,10,10))
- display.blit(segment.image, segment.rect)
- pygame.display.flip()
- clock.tick(60)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement