drawing player
This commit is contained in:
6
main.py
6
main.py
@@ -2,6 +2,7 @@ import pygame
|
||||
import sys
|
||||
|
||||
from constants import *
|
||||
from player import Player
|
||||
|
||||
def main():
|
||||
print("Starting Asteroids!")
|
||||
@@ -19,12 +20,17 @@ def main():
|
||||
time = pygame.time.Clock()
|
||||
dt = 0
|
||||
|
||||
player = Player(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2)
|
||||
|
||||
while True:
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
return
|
||||
|
||||
pygame.Surface.fill(screen, (0,0,0))
|
||||
|
||||
player.draw(screen)
|
||||
|
||||
pygame.display.flip() #refresh screen
|
||||
|
||||
dt = time.tick(60) / 1000 #conveted to ms
|
||||
|
||||
Reference in New Issue
Block a user