0
import pygame
import Selection
import Round
import Winner
import Fighting
pygame.init()
screen = pygame.display.set_mode((640, 500))
def main():
process = 0
clock = pygame.time.Clock()
keepGoing = True
while keepGoing:
clock.tick(30)
for event in pygame.event.get():
if event.type == pygame.QUIT:
keepGoing = False
if process == 0:
Selection.main()
process += 1
elif process == 1:
Fighting.main()
process += 1
pygame.quit()
if __name__ == "__main__":
main()
出現是錯誤每次我跑我的比賽,我得到pygame.error:視頻系統未初始化
for event in pygame.event.get():
pygame.error: video system not initialized
它貫穿於計劃,並得到
Selection.main()
和調用該程序運行良好,但當關閉此程序時啓動備份在
clock.tick(30)
但隨後停止在
for event in pygame.event.get()
,並拋出這個錯誤。
import Round
import Winner
還沒有做任何事,因爲那些程序還沒有寫入。