- 博客(4)
- 收藏
- 关注
原创 小球走迷宫小游戏
import pygame import random import sys from pygame.locals import* pygame.init() screen = pygame.display.set_mode((680,640),0,32) red = 255,0,255 green = 0,255,0 def print_text(src,font,x,y,text,color=green): imgText = font.render(text,True,color) src.blit(
2022-03-29 21:16:33
2997
原创 点击让球消失
import pygame import random import sys from pygame.locals import* pygame.init() screen = pygame.display.set_mode((640,780),0,32) red = 255,0,255 screen.fill(red) tid = (200,100) pygame.draw.circle(screen, (255,0,0), tid, 50) spot = pygame.mouse.get_pos() w
2022-03-25 11:35:40
4027
原创 方块相撞运动
import random import pygame pygame.mixer.init() pygame.init() screen = pygame.display.set_mode((640,780),0,32) clock = pygame.time.Clock() rect1 = pygame.Rect(0,100,100,50) rect2 = pygame.Rect(600,100,100,80) font = pygame.font.Font(“c:/windows/Fonts/Stzho
2022-03-18 13:39:47
3580
原创 挡板接球小游戏
学习目标: ` 学习做个小游戏 学习内容: import pygame import sys import random from pygame.locals import* pygame.init() screen = pygame.display.set_mode((640,780),0,32) ball_x,ball_y = random.randint(30,320),-50 vel_y = random.randint(0,10) vel_x = random.randint(0,10) re
2022-03-16 18:51:49
4157
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人