Exemple #1
0
from pygame.locals import *

pygame.init()

screen = pygame.display.set_mode((640, 640))
font = pygame.font.SysFont(None, 36)


def draw_text(display_string, font, surface, x_pos, y_pos):
    text_display = font.render(display_string, 1, (0, 0, 0))
    surface.blit(text_display, (x_pos, y_pos))


screen.fill((255, 255, 255))

ship = MyShip()

ship_image_list = []

initial_rotation = 0

for x in range(0, 8):
    temp_image = pygame.transform.rotate(ship.image, initial_rotation)
    initial_rotation += 45
    ship_image_list.append(temp_image)

speed_one_dir = 15
speed = [speed_one_dir, speed_one_dir]
rot_image = 4
x_pos = 200
y_pos = 200