屏幕填充不起作用



所以我遇到了这个奇怪的问题,我无法填满屏幕。我的代码是

#Import all modules
import pygame
import random
import math
import time
#Colors
BLACK = ( 0, 0, 0)
WHITE = ( 255, 255, 255)
GREEN = ( 0, 255, 0)
RED = ( 255, 0, 0)
ORANGe = (255, 115, 0)
YELLOW = (242, 255, 0)
BROWN = (115, 87, 39)
PURPLE = ( 298, 0, 246)
GRAY = ( 168, 168, 168)
BLUE = ( 0, 0, 255)
pygame.init()
# Clock
clock = pygame.time.Clock()
#Screen
screenx = 1000
screeny = 700
screen = pygame.display.set_mode([screenx,screeny])
#Title
pygame.display.set_caption("OUCH Version 0.1")
#Classes (if any)
#Variables
sound = True
password = False
titlescreen = True
#Booleans


#Sounds

#The graphics

#Positions

#Time management
fps = 60
#Other Things

#Main Loop__________________________________________________
done = False
while not done:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            done = True
    if titlescreen:
        screen.fill(WHITE)


    #Flip the Display
    pygame.display.flip
    clock.tick(fps)
#If done
pygame.quit()

我刚刚更新到python 3.4,这可能是问题所在。还是我忽略了什么。我试图将屏幕填满白色,但每次运行它时,屏幕总是变成黑色。感谢您的任何帮助。:)

我有什么tried__________

我尝试查看他们是否带有白色的东西,但是当我尝试任何其他颜色时,它不起作用。我也尝试过用布尔值填充屏幕,但这也不起作用。我也尝试不做如果标题屏幕:,但如果标题屏幕 == True:那么等等

你忘了放刹车:

pygame.display.flip()

最新更新