- 博客(3)
- 资源 (1)
- 收藏
- 关注
原创 开心消消乐在屏幕中向下移动的完整代码
import random import pygame as pg WIDTH = 400 HEIGHT = 400 NUMGRID = 8 GRIDSIZE = 36 XMARGIN = (WIDTH - GRIDSIZE * NUMGRID) // 2 YMARGIN = (HEIGHT - GRIDSIZE * NUMGRID) // 2 # 加载图片 gem_imgs = [pg.image.load('resources/images/gem{}.png'.format(i)) for i .
2021-12-18 11:46:26
1304
原创 pygame 的装备合成
def equit_hecheng(group, kind): grp = group.deepcopy() # copy.deepcopy() t = True for mapp in k_list: for k in kind: if mapp.name in k.keys(): if mapp.num < k[mapp.name]: t.
2021-11-18 20:18:38
2830
原创 植物大战僵尸
植物大战僵尸的主界面函数 import sys import pygame as pg from MainGame import MainGame main = MainGame() main.start() clock = pg.time.Clock() screen = pg.display.get_surface() while True: for event in pg.event.get(): pos = pg.mouse.get_pos() i.
2021-11-11 15:35:17
2310
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人