Commit 5c33964b by BellCodeEditor

auto save

parent 686c5f10
Showing with 2 additions and 2 deletions
import pygame
from pygame import locals
import random
import random
pygame.init() # 初始化
......@@ -108,7 +108,7 @@ while True:
block_list.add(obstacle)
for sprite in block_list: # 遍历、展示障碍物精灵
sprite.rect.x -= 8
screen.blit(sprite.image, (sprite.rect.x, sprite.rect.y))
screen.blit(sprite.image, (sprite.rect.x, sprite.rect.y))
if sprite.rect.x <= 0-sprite.rect.width:
sprite.kill()
if pygame.sprite.collide_rect(wukong, sprite): # 精灵碰撞检测
......
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