Commit f7927972 by BellCodeEditor

save project

parent c3f63c2f
Showing with 52 additions and 1 deletions
import pygame
from pygame import locals
pygame.init()
score = 0
grid_size = 20
grid_num_width = 15
grid_num_height = 25
FPS =30
screen = pygame.display.set_mode((460,500))
pygame.display.set_caption("ZZH方块")
clock = pygame.time.Clock()
backgord = pygame.image.load('bg.png')
font = pygame.font.Font('neuropol.TTF',60)
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
screen.blit(backgord,(0,0))
pygame.draw.rect(screen,(255,0,0),(140,20,20,20),0)
pygame.draw.rect(screen,(255,255,255),(140,20,20,20),1)
score_text = font.render(str(score),True,(0,0,0))
screen.blit(score_text,(350,70))
pygame.display.update()
clock.tick(FPS)
\ No newline at end of file
import pygame
form pygame import locals
pygame.init()
screen = pygame.display.set_mode((640,480))
bg_img = pygame.imageload('bg.png')
play_img = pygame.imageload('play.png')
stop_img = pygame.imageload('stop.png')
last_img = pygame.imageload('last.png')
next_img = pygame.imageload('next.png')
logo_img = pygame.imageload('logo.png')
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
screen.blit(bg_img,(0,0))
screen.blit(stop_img,(270,330))
screen.blit(logo_img,(170,60))
screen.blit(last_img,(120,350))
screen.blit(next_img,(420,350))
pygame.display.update()
\ No newline at end of file
...@@ -78,5 +78,5 @@ while True: ...@@ -78,5 +78,5 @@ while True:
text = my_fout.render(info,True,(157,178,249)) text = my_fout.render(info,True,(157,178,249))
screen.blit(text,(540,10)) screen.blit(text,(540,10))
pygame.display.update() pygame.display.update()
FPSCLOCK.tick(3) FPSCLOCK.tick(3)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment