Commit 61eab31f by BellCodeEditor

auto save

parent 619d026c
Showing with 1 additions and 15 deletions
import pygame
from pygame import locals
import random
import json
pygame.init() # 初始化
......@@ -16,7 +15,6 @@ class Block(pygame.sprite.Sprite): # 障碍物精灵类
self.rect.x = 1000
self.rect.y = 500 - self.rect.height
class Player(pygame.sprite.Sprite): # 悟空
def __init__(self, image):
super().__init__()
......@@ -54,19 +52,7 @@ time = 0
score=0
gamestate = True
block_list =pygame.sprite.Group()
# 创建精灵组
with open('record.txt','r',encoding='utf-8')as f:
content=f.read()
content=json.loads(content)
one=record("第一名")
two=record("第二名")
three=record("第三名")
block_list =pygame.sprite.Group() # 创建精灵组
while True:
for event in pygame.event.get():
......
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