标签:upd sleep pre from ini get style play 色彩
屏幕慢慢被各种色彩填满,很舒服看上去
#_*_coding:utf-8 _*_ from time import sleep import pygame from pygame.locals import * from sys import exit from random import randint pygame.init() screen=pygame.display.set_mode((640,480),0,32) while True: for event in pygame.event.get(): if event.type==QUIT: exit() rand_col=(randint(0,255),randint(0,255),randint(0,255)) #screen.lock() for _ in xrange(100): rand_pos=(randint(0,639),randint(0,479)) screen.set_at(rand_pos,rand_col) #screen.unlock() #sleep(1) pygame.display.update()
标签:upd sleep pre from ini get style play 色彩
原文地址:http://www.cnblogs.com/superxuezhazha/p/7439593.html